From: Hans de Goede <hdegoede@redhat.com>
To: "yuechao.zhao(赵越超)" <yuechao.zhao@advantech.com.cn>,
"Andy Shevchenko" <andy.shevchenko@gmail.com>,
"Campion Kang" <campion.kang@advantech.com.tw>
Cc: "345351830@qq.com" <345351830@qq.com>,
"Rainbow.Zhang(張玉)" <Rainbow.Zhang@advantech.com.cn>,
"yunxia.li(李云霞)" <yunxia.li@advantech.com.cn>,
"pavel@ucw.cz" <pavel@ucw.cz>, "dmurphy@ti.com" <dmurphy@ti.com>,
"Jia.Sui(贾睢)" <Jia.Sui@advantech.com.cn>,
"Mark Gross" <mgross@linux.intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"platform-driver-x86@vger.kernel.org"
<platform-driver-x86@vger.kernel.org>
Subject: Re: [v3,1/1] adv_mix955x is a scheme that multiplexes PCA9554/PCA9555 into LED and GPIO
Date: Thu, 6 May 2021 10:47:14 +0200 [thread overview]
Message-ID: <f72fd002-97f7-c121-4230-aa084f054680@redhat.com> (raw)
In-Reply-To: <ec4da512-76c7-acec-f41d-179fd469b615@redhat.com>
Hi,
On 5/5/21 3:23 PM, Hans de Goede wrote:
> 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.
I just saw the "Advantech AHC1EC0 embedded controller" patch series
posted by your colleague Campion Kang (added to the Cc) it seems that
that series is using devicetree config bits embedded inside the ACPI
tables. If you can still change / update the ACPI tables then perhaps
using that would be an option here too ? And then just include the
whole GPIO LED descriptions inside the embedded devicetree bits.
Regards,
Hans
>> 在 2021/5/2 下午6:50,“Andy Shevchenko”<andy.shevchenko@gmail.com> 写入:
>>
>> On Fri, Apr 30, 2021 at 8:27 AM yuechao.zhao(赵越超)
>> <yuechao.zhao@advantech.com.cn> wrote:
>> >
>> > From: Yuechao Zhao <yuechao.zhao@advantech.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
>>
prev parent reply other threads:[~2021-05-06 8:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <tencent_F8EEB847E2CD8A6813D0BF4863964CDF3508@qq.com>
2021-04-30 5:26 ` yuechao.zhao(赵越超)
2021-05-02 10:50 ` Andy Shevchenko
2021-05-03 13:16 ` yuechao.zhao(赵越超)
2021-05-05 13:23 ` Hans de Goede
2021-05-06 8:47 ` Hans de Goede [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f72fd002-97f7-c121-4230-aa084f054680@redhat.com \
--to=hdegoede@redhat.com \
--cc=345351830@qq.com \
--cc=Jia.Sui@advantech.com.cn \
--cc=Rainbow.Zhang@advantech.com.cn \
--cc=andy.shevchenko@gmail.com \
--cc=campion.kang@advantech.com.tw \
--cc=dmurphy@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgross@linux.intel.com \
--cc=pavel@ucw.cz \
--cc=platform-driver-x86@vger.kernel.org \
--cc=yuechao.zhao@advantech.com.cn \
--cc=yunxia.li@advantech.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®