Re: [PATCH v2 2/2] hwmon: ltc4282: add support for the LTC4282 chip

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

 



On Sat, Dec 2, 2023 at 10:42 AM Nuno Sá <noname.nuno@xxxxxxxxx> wrote:

 Hopefully, I'll get into the gpio stuff later on. From a brief look,
the auxiliary
> bus might feet and easier than mfd.

You can also just spawn a random platform_device from the HWMON driver
and let that probe a driver down in drivers/gpio/*.

static struct platform_device my_gpio_device = {
        .name = "my-gpio",
        .id = -1,
};

my_gpio_device.dev.platform_data = ... ;
my_gpio_device.dev.parent = dev;
return platform_device_register(&my_gpio_device);

You can then pass any accessors as platform data. This in a way is what
the MFD or aux buses do just more organized.

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