Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp703443pxb; Tue, 19 Oct 2021 11:09:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAru7fPP7MH7mVwvpw6U20KuQ/5PU3jj/rNgXwMvtZXeMssTijHRVv/7eu1+JNSK9lXQm4 X-Received: by 2002:a05:6402:3554:: with SMTP id f20mr55947855edd.354.1634666957209; Tue, 19 Oct 2021 11:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634666957; cv=none; d=google.com; s=arc-20160816; b=JxX83AFsHHVbZxHEa6z7f0udnwjdku/EpnEnzYrWhjeDlzVMGn2cpnwubrbPHz0tYH tzxM69WlmY5pwwJegWp1QTkea1aE/9uxiqshi71pL7Kkjv05YQkwDqzcsH+8Ijb80aUz dOFju+bkqC7fQ5XX9b3aIIyvM9soV0XMx0aR5x5a5cdzLGEjwAJV9z+EXmftziNNX+Bx SIhmSnxm09ozTaUKPU+aKlCO/yzP0y7T9nr4J01MFX78SJM21hrVwmxieJtOlYfbeN+e gaSj4lLeX2WsSspAyFO4ZdM1Xau1Ah50zpcsg97lmxm7vvsz2rEBPElJrOVFm+hDZBB9 ax7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:lines:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from; bh=SyJVzIBEjxs7c9dI3Kn08C/kwkwgcqt0cF8AotsH9BA=; b=Sh13whgFMuSfqs2tU89m9dX+uhy582pfcmJme/UwM0Qg72zyoe93Uux/MosVIQEqvW jMN63lK72zu5NuKexf4gbdeCirpKF1GWW2pxjSLr6Uq0aYgt0qL7TgeM63WoslTjAM7b nZUTjyZJzVOo+KfAxq4/CRJaU6tkqczHB5Jsp5eWWogyV+hi57G48oVd3XKvN74R5wbU dTWgsEqVmt5bWN+qDm8ezNH4AGQcx3M/lMXYi5lDQt7ka21QAmIimwRnMI1gdPPW+JHA U2RSRti14UtogmxPWvDorxj7JX8O+jUttJ8IJxww6O829uc5GfdOFK3BptO6WQ73VF+F 9Zrg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ht13si34005413ejc.771.2021.10.19.11.08.30; Tue, 19 Oct 2021 11:09:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234670AbhJSSI4 (ORCPT + 99 others); Tue, 19 Oct 2021 14:08:56 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:45693 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230158AbhJSSIz (ORCPT ); Tue, 19 Oct 2021 14:08:55 -0400 Received: (Authenticated sender: peter@korsgaard.com) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id C9A5D1C0002; Tue, 19 Oct 2021 18:06:39 +0000 (UTC) Received: from peko by dell.be.48ers.dk with local (Exim 4.92) (envelope-from ) id 1mctVX-0005yF-6z; Tue, 19 Oct 2021 20:06:39 +0200 X-From-Line: nobody Tue Oct 19 17:14:02 2021 From: Peter Korsgaard To: Hans de Goede Cc: Santosh Kumar Yadav , santoshyadav30@gmail.com, Mark Gross , Peter Korsgaard , 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 References: <20211013140356.6235-1-santoshkumar.yadav@barco.com> <6183f051-969e-19e9-dd53-0d56a2fdf218@redhat.com> Date: Tue, 19 Oct 2021 17:14:02 +0200 In-Reply-To: <6183f051-969e-19e9-dd53-0d56a2fdf218@redhat.com> (Hans de Goede's message of "Tue, 19 Oct 2021 16:50:22 +0200") Message-ID: <87a6j5cait.fsf@dell.be.48ers.dk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Lines: 74 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>>>> "Hans" == Hans de Goede 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 >> Signed-off-by: Peter Korsgaard > 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