lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f72fd002-97f7-c121-4230-aa084f054680@redhat.com>
Date:   Thu, 6 May 2021 10:47:14 +0200
From:   Hans de Goede <hdegoede@...hat.com>
To:     yuechao.zhao(赵越超) 
        <yuechao.zhao@...antech.com.cn>,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        Campion Kang <campion.kang@...antech.com.tw>
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/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@...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

Powered by Openwall GNU/*/Linux Powered by OpenVZ