mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Santosh Kumar Yadav <santoshkumar.yadav@barco.com>,
	santoshyadav30@gmail.com, Mark Gross <mgross@linux.intel.com>,
	Peter Korsgaard <peter.korsgaard@barco.com>,
	linux-kernel@vger.kernel.org,
	platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH] platform/x86: Support for EC-connected GPIOs for identify LED/button on Barco P50 board
Date: Tue, 19 Oct 2021 17:14:02 +0200	[thread overview]
Message-ID: <87a6j5cait.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <6183f051-969e-19e9-dd53-0d56a2fdf218@redhat.com> (Hans de Goede's message of "Tue, 19 Oct 2021 16:50:22 +0200")

>>>>> "Hans" == Hans de Goede <hdegoede@redhat.com> writes:

 > Hi,
 > On 10/13/21 16:03, Santosh Kumar Yadav wrote:
 >> Add a driver providing access to the GPIOs for the identify button and led
 >> present on Barco P50 board, based on the pcengines-apuv2.c driver.
 >> 
 >> There is unfortunately no suitable ACPI entry for the EC communication
 >> interface, so instead bind to boards with "P50" as their DMI product family
 >> and hard code the I/O port number (0x299).
 >> 
 >> The driver also hooks up the leds-gpio and gpio-keys-polled drivers to the
 >> GPIOs, so they are finally exposed as:
 >> 
 >> LED:
 >> /sys/class/leds/identify
 >> 
 >> Button: (/proc/bus/input/devices)
 >> I: Bus=0019 Vendor=0001 Product=0001 Version=0100
 >> N: Name="identify"
 >> P: Phys=gpio-keys-polled/input0
 >> S: Sysfs=/devices/platform/barco-p50-gpio/gpio-keys-polled/input/input10
 >> U: Uniq=
 >> H: Handlers=event10
 >> B: PROP=0
 >> B: EV=3
 >> B: KEY=1000000 0 0 0 0 0 0
 >> 
 >> Signed-off-by: Santosh Kumar Yadav <santoshkumar.yadav@barco.com>
 >> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

 > Thanks, overall this looks pretty good. I've a couple of comments inline,
 > please send a v2 addresing this.

..

 >> +/* Board setup */
 >> +static const struct dmi_system_id dmi_ids[] __initconst = {
 >> +       {
 >> +               .matches = {
 >> +                       DMI_EXACT_MATCH(DMI_PRODUCT_FAMILY, "P50")
 >> +               },
 >> +       },

 > But I'm a bit worried about the DMI match, it seems a bit too generic.

 > E.g. Lenovo also has a P50 laptop series.

 > For v2 please make the DMI match also on e.g. sys_vendor.

Agreed, will add a match on vendor = Barco.


 > You should put a:

 > MODULE_DEVICE_TABLE(dmi, dmi_ids);

 > here, this will add a dmi based modalias to the module, so that it will
 > be automatically loaded at boot on systems which match the dmi_ids table.

Ok.


 >> +MODULE_SOFTDEP("pre: platform:leds-gpio platform:gpio-keys-polled");

 > Is this softdep really necessary ? I would expect things to work fine too if
 > the leds-gpio and gpio-keys-polled drivers are loaded automatically after
 > the platform_devices for them have been created .

True. This was copied over from pcengines-apuv2.c, but we'll drop it for
v2.

-- 
Bye, Peter Korsgaard

      reply	other threads:[~2021-10-19 18:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-13 14:03 Santosh Kumar Yadav
2021-10-19 14:50 ` Hans de Goede
2021-10-19 15:14   ` Peter Korsgaard [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=87a6j5cait.fsf@dell.be.48ers.dk \
    --to=peter@korsgaard.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgross@linux.intel.com \
    --cc=peter.korsgaard@barco.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=santoshkumar.yadav@barco.com \
    --cc=santoshyadav30@gmail.com \
    /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®