Re: [PATCH v2 3/3] gpio: gpio-ltc4283: Add support for the LTC4283 Swap Controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Nuno,

thanks for your patch!

On Wed, Sep 3, 2025 at 12:04 PM Nuno Sá via B4 Relay
<devnull+nuno.sa.analog.com@xxxxxxxxxx> wrote:

> From: Nuno Sá <nuno.sa@xxxxxxxxxx>
>
> The LTC4283 device has up to 8 pins that can be configured as GPIOs.
>
> Note that PGIO pins are not set as GPIOs by default so if they are
> configured to be used as GPIOs we need to make sure to initialize them
> to a sane default. They are set as inputs by default.
>
> Signed-off-by: Nuno Sá <nuno.sa@xxxxxxxxxx>

(...)

> +config GPIO_LTC4283
> +       tristate "Analog Devices LTC4283 GPIO support"
> +       depends on SENSORS_LTC4283

Could that be
depends on REGMAP && (SENSOR_LTC4283 || COMPILE_TEST)
?

Or does something blow up if you do that? (I guess it also needs
AUXBUS but more on that below)

should it also be

default SENSOR_LTC4283

Sof if that is compiled in (=y) or module (=m) then this becomes
the same by default?

> +       help
> +         If you say yes here you want the GPIO function available in Analog
> +         Devices LTC4283 Negative Voltage Hot Swap Controller.
> +
> +         This driver can also be built as a module. If so, the module will
> +         be called gpio-ltc4283.
> +
>  config GPIO_MB86S7X

This is placed among the memory-mapped drivers, but:

> +#include <linux/auxiliary_bus.h>
(...)
> +static struct auxiliary_driver ltc4283_gpio_driver = {
> +       .probe = ltc4283_gpio_probe,
> +       .id_table = ltc4283_aux_id_table,
> +};
> +module_auxiliary_driver(ltc4283_gpio_driver);

Create a new submenu for auxiliary bus drivers and add it
there. We already have a submenu for MFD so why not?

menu "AUXBUS GPIO expanders"
  depends on AUXILIARY_BUS
...

Have you looked into using GPIO_REGMAP?
I guess some specials are used here so maybe it is
not possible.

Yours,
Linus Walleij





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux