[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ec4da512-76c7-acec-f41d-179fd469b615@redhat.com>
Date: Wed, 5 May 2021 15:23:58 +0200
From: Hans de Goede <hdegoede@...hat.com>
To: yuechao.zhao(赵越超)
<yuechao.zhao@...antech.com.cn>,
Andy Shevchenko <andy.shevchenko@...il.com>
Cc: "345351830@...com" <345351830@...com>,
Rainbow.Zhang(張玉)
<Rainbow.Zhang@...antech.com.cn>,
yunxia.li(李云霞)
<yunxia.li@...antech.com.cn>, "pavel@....cz" <pavel@....cz>,
"dmurphy@...com" <dmurphy@...com>,
Jia.Sui(贾睢) <Jia.Sui@...antech.com.cn>,
Mark Gross <mgross@...ux.intel.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"platform-driver-x86@...r.kernel.org"
<platform-driver-x86@...r.kernel.org>
Subject: Re: [v3,1/1] adv_mix955x is a scheme that multiplexes PCA9554/PCA9555
into LED and GPIO
Hi,
On 5/3/21 3:16 PM, yuechao.zhao(赵越超) wrote:
> Hi Andy
> Sorry for the late reply
>
> The reason for writing this driver is that our customers hope that the LED and GPIO can be used out of the box
> When they using our X86-Platform
>
> About the document and ACPI expert, I will provide them after I improve them. Please wait for a few days.
So my initial assessment of this code matches Andy's I don't like the idea
of duplicating the GPIO chip functionality from drivers/gpio/gpio-pca953x.c here.
I understand that you want to have things working out of the box and I believe
that we all agree that that is what we want.
But you can get there without duplicating the code.
We already have cases where there is an I2C device with an existing driver
where we need some "glue" code to translate the ACPI provided info to
what the i2c drivers expect, some examples of these are:
drivers/platform/x86/i2c-multi-instantiate.c
drivers/platform/x86/intel_cht_int33fe_typec.c
So what you need to do is basically start writing a completely new driver
which:
1. Instantiates an i2c-client for the drivers/gpio/gpio-pca953x.c driver
to bind to.
2. Creates and attaches software-fwnodes which provide info for the
drivers/leds/leds-gpio.c code to parse and have that code instantiate
LED class devices which drive the leds through the GPIO interface
offered by the drivers/gpio/gpio-pca953x.c driver.
Regards,
Hans
> 在 2021/5/2 下午6:50,“Andy Shevchenko”<andy.shevchenko@...il.com> 写入:
>
> On Fri, Apr 30, 2021 at 8:27 AM yuechao.zhao(赵越超)
> <yuechao.zhao@...antech.com.cn> wrote:
> >
> > From: Yuechao Zhao <yuechao.zhao@...antech.com.cn>
> >
> > With this driver, we can multiplex PCA9554/PCA9555 into LED and GPIO
> > based on the ACPI data of BIOS.
>
> NAK as per v2.
>
> Please, add a proper documentation and show ACPI excerpt, and last but
> not least is missing justification.
>
>
> --
> With Best Regards,
> Andy Shevchenko
>
Powered by blists - more mailing lists