mbox series

[0/2,SRU,J] Add ODM driver gpio-m058ssan

Message ID 20231228032345.1148513-1-acelan.kao@canonical.com
Headers show
Series Add ODM driver gpio-m058ssan | expand

Message

AceLan Kao Dec. 28, 2023, 3:23 a.m. UTC
From: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>

BugLink: https://bugs.launchpad.net/bugs/2045386

[ Impact ]
gpio-m058ssan driver needed for ODM partner

[ Test Plan ]
Connect the loopback GPIO connector to the ReliaCOR-40-13 system and
connect the power supply of the GPIO connector.

insert the "m058ssan" module:
modprobe m058ssan

create GPIOchip:
echo "m058ssan 0x40" > /sys/bus/i2c/devices/i2c-0/new_device

get the GPIO chip base and export 16 GPIOs. The former 8 are GPOs,
the latter 8 are GPIs.

Set and reset all of the GPOs one at a time and check that the
corresponding GPI is set and reset accordingly.

[ Where problems could occur ]
Make sure that the power supply of the GPIO connector is correctly
connected, otherwise the GPI will always report 0.
Events could occur on the i2c bus communication that may cause
miss-behavior of the driver.

Chia-Lin Kao (AceLan) (1):
  UBUNTU: [Config] updateconfigs for ODM drivers CONFIG_GPIO_M058SSAN

Filippo Copetti (1):
  UBUNTU: SAUCE: ODM: gpio: add M058SSAN gpio driver

 MAINTAINERS                      |   5 +
 debian.master/config/annotations |   1 +
 drivers/gpio/Kconfig             |   6 +
 drivers/gpio/Makefile            |   1 +
 drivers/gpio/gpio-m058ssan.c     | 192 +++++++++++++++++++++++++++++++
 5 files changed, 205 insertions(+)
 create mode 100644 drivers/gpio/gpio-m058ssan.c

Comments

Tim Gardner Jan. 3, 2024, 5:31 p.m. UTC | #1
On 12/27/23 8:23 PM, AceLan Kao wrote:
> From: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/2045386
> 
> [ Impact ]
> gpio-m058ssan driver needed for ODM partner
> 
> [ Test Plan ]
> Connect the loopback GPIO connector to the ReliaCOR-40-13 system and
> connect the power supply of the GPIO connector.
> 
> insert the "m058ssan" module:
> modprobe m058ssan
> 
> create GPIOchip:
> echo "m058ssan 0x40" > /sys/bus/i2c/devices/i2c-0/new_device
> 
> get the GPIO chip base and export 16 GPIOs. The former 8 are GPOs,
> the latter 8 are GPIs.
> 
> Set and reset all of the GPOs one at a time and check that the
> corresponding GPI is set and reset accordingly.
> 
> [ Where problems could occur ]
> Make sure that the power supply of the GPIO connector is correctly
> connected, otherwise the GPI will always report 0.
> Events could occur on the i2c bus communication that may cause
> miss-behavior of the driver.
> 
> Chia-Lin Kao (AceLan) (1):
>    UBUNTU: [Config] updateconfigs for ODM drivers CONFIG_GPIO_M058SSAN
> 
> Filippo Copetti (1):
>    UBUNTU: SAUCE: ODM: gpio: add M058SSAN gpio driver
> 
>   MAINTAINERS                      |   5 +
>   debian.master/config/annotations |   1 +
>   drivers/gpio/Kconfig             |   6 +
>   drivers/gpio/Makefile            |   1 +
>   drivers/gpio/gpio-m058ssan.c     | 192 +++++++++++++++++++++++++++++++
>   5 files changed, 205 insertions(+)
>   create mode 100644 drivers/gpio/gpio-m058ssan.c
> 

This driver has the same problem as rtc-pcf85263, i.e., sketchy 
provenance, adding an out of tree driver to a stable kernel without 
first merging it into newer kernels.
Roxana Nicolescu Jan. 9, 2024, 11:59 a.m. UTC | #2
On 28/12/2023 04:23, AceLan Kao wrote:
> From: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>
>
> BugLink: https://bugs.launchpad.net/bugs/2045386
>
> [ Impact ]
> gpio-m058ssan driver needed for ODM partner
>
> [ Test Plan ]
> Connect the loopback GPIO connector to the ReliaCOR-40-13 system and
> connect the power supply of the GPIO connector.
>
> insert the "m058ssan" module:
> modprobe m058ssan
>
> create GPIOchip:
> echo "m058ssan 0x40" > /sys/bus/i2c/devices/i2c-0/new_device
>
> get the GPIO chip base and export 16 GPIOs. The former 8 are GPOs,
> the latter 8 are GPIs.
>
> Set and reset all of the GPOs one at a time and check that the
> corresponding GPI is set and reset accordingly.
>
> [ Where problems could occur ]
> Make sure that the power supply of the GPIO connector is correctly
> connected, otherwise the GPI will always report 0.
> Events could occur on the i2c bus communication that may cause
> miss-behavior of the driver.
>
> Chia-Lin Kao (AceLan) (1):
>    UBUNTU: [Config] updateconfigs for ODM drivers CONFIG_GPIO_M058SSAN
>
> Filippo Copetti (1):
>    UBUNTU: SAUCE: ODM: gpio: add M058SSAN gpio driver
>
>   MAINTAINERS                      |   5 +
>   debian.master/config/annotations |   1 +
>   drivers/gpio/Kconfig             |   6 +
>   drivers/gpio/Makefile            |   1 +
>   drivers/gpio/gpio-m058ssan.c     | 192 +++++++++++++++++++++++++++++++
>   5 files changed, 205 insertions(+)
>   create mode 100644 drivers/gpio/gpio-m058ssan.c
>
Acked-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
Stefan Bader Jan. 9, 2024, 1:33 p.m. UTC | #3
On 28.12.23 04:23, AceLan Kao wrote:
> From: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/2045386
> 
> [ Impact ]
> gpio-m058ssan driver needed for ODM partner
> 
> [ Test Plan ]
> Connect the loopback GPIO connector to the ReliaCOR-40-13 system and
> connect the power supply of the GPIO connector.
> 
> insert the "m058ssan" module:
> modprobe m058ssan
> 
> create GPIOchip:
> echo "m058ssan 0x40" > /sys/bus/i2c/devices/i2c-0/new_device
> 
> get the GPIO chip base and export 16 GPIOs. The former 8 are GPOs,
> the latter 8 are GPIs.
> 
> Set and reset all of the GPOs one at a time and check that the
> corresponding GPI is set and reset accordingly.
> 
> [ Where problems could occur ]
> Make sure that the power supply of the GPIO connector is correctly
> connected, otherwise the GPI will always report 0.
> Events could occur on the i2c bus communication that may cause
> miss-behavior of the driver.
> 
> Chia-Lin Kao (AceLan) (1):
>    UBUNTU: [Config] updateconfigs for ODM drivers CONFIG_GPIO_M058SSAN
> 
> Filippo Copetti (1):
>    UBUNTU: SAUCE: ODM: gpio: add M058SSAN gpio driver
> 
>   MAINTAINERS                      |   5 +
>   debian.master/config/annotations |   1 +
>   drivers/gpio/Kconfig             |   6 +
>   drivers/gpio/Makefile            |   1 +
>   drivers/gpio/gpio-m058ssan.c     | 192 +++++++++++++++++++++++++++++++
>   5 files changed, 205 insertions(+)
>   create mode 100644 drivers/gpio/gpio-m058ssan.c
> 

Acked-by: Stefan Bader <stefan.bader@canonical.com>
Stefan Bader Jan. 9, 2024, 2:05 p.m. UTC | #4
On 28.12.23 04:23, AceLan Kao wrote:
> From: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/2045386
> 
> [ Impact ]
> gpio-m058ssan driver needed for ODM partner
> 
> [ Test Plan ]
> Connect the loopback GPIO connector to the ReliaCOR-40-13 system and
> connect the power supply of the GPIO connector.
> 
> insert the "m058ssan" module:
> modprobe m058ssan
> 
> create GPIOchip:
> echo "m058ssan 0x40" > /sys/bus/i2c/devices/i2c-0/new_device
> 
> get the GPIO chip base and export 16 GPIOs. The former 8 are GPOs,
> the latter 8 are GPIs.
> 
> Set and reset all of the GPOs one at a time and check that the
> corresponding GPI is set and reset accordingly.
> 
> [ Where problems could occur ]
> Make sure that the power supply of the GPIO connector is correctly
> connected, otherwise the GPI will always report 0.
> Events could occur on the i2c bus communication that may cause
> miss-behavior of the driver.
> 
> Chia-Lin Kao (AceLan) (1):
>    UBUNTU: [Config] updateconfigs for ODM drivers CONFIG_GPIO_M058SSAN
> 
> Filippo Copetti (1):
>    UBUNTU: SAUCE: ODM: gpio: add M058SSAN gpio driver
> 
>   MAINTAINERS                      |   5 +
>   debian.master/config/annotations |   1 +
>   drivers/gpio/Kconfig             |   6 +
>   drivers/gpio/Makefile            |   1 +
>   drivers/gpio/gpio-m058ssan.c     | 192 +++++++++++++++++++++++++++++++
>   5 files changed, 205 insertions(+)
>   create mode 100644 drivers/gpio/gpio-m058ssan.c
> 

Applied to jammy:linux/master-next. Thanks.

-Stefan