Mcp23017 driver in ver 6

Hi
I could not find driver for MCP23017 on version 6.4 of kernel

Hello,

Just to be sure, when you mean version 6.4 of kernel you mean TorizonCore 6.4 (nightly) ? If so, on my side it’s working with the following overlay:

&i2c2 {
	clock-frequency = <400000>;
	status          = "okay";

	/*
	 * controle bit:
	 * | 0 | 1 | 0 | 0 | A2 | A1 | A0 | RW |
	 * | 0 | 1 | 0 | 0 | 0  | 0  | 0  | 0  |
	 *
	 * for U3: 0b01000000 >> 1 = 0x20 (cause of 7bits)
	 */
	expander16_gpios: gpio@20 {
		compatible       = "microchip,mcp23017";

		reset-gpios      = <&gpio1 0x06 GPIO_ACTIVE_LOW>; /* PSWITCH_nRESET SODIMM 212 */
		reg              = <0x20>;

		#gpio-cells      = <0x02>;
		gpio-controller;
		ngpios           = <0x10>;

		status           = "okay";
	};
};

Best regards,
M

1 Like

Hi Linux ver 6.5.6
as you could see the driver on ver 4.9 available here

but it don’t available here
https://elixir.bootlin.com/linux/v6.5.6/source/drivers/gpio/gpio-mcp23s08.c

Hi @kavevso ,

Looking at the upstream commits, starting from kernel v4.13 this driver was moved and renamed from drivers/gpio/gpio-mcp23s08.c to drivers/pinctrl/pinctrl-mcp23s08.c, as you can see on this commit from 2017:

You can see this is still the case with kernel v6.5.y stable:

Best regards,
Lucas Akira