All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: dtor@google.com, Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Kate Stewart <kstewart@linuxfoundation.org>,
	Enrico Weigelt <info@metux.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Allison Randal <allison@lohutok.net>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Stephen Boyd <swboyd@chromium.org>,
	linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, furquan@google.com,
	dlaurie@google.com, bleung@google.com, zentaro@google.com,
	dbehr@google.com, rajatxjain@gmail.com,
	Rajat Jain <rajatja@google.com>
Subject: Re: [PATCH v2 1/5] input/serio/i8042: Attach fwnode to serio i8042 kbd device
Date: Thu, 26 Mar 2020 14:25:05 -0700	[thread overview]
Message-ID: <20200326212505.GI75430@dtor-ws> (raw)
In-Reply-To: <20200324123518.239768-1-rajatja@google.com>

On Tue, Mar 24, 2020 at 05:35:14AM -0700, Rajat Jain wrote:
> Attach the firmware node to the serio i8042 kbd device so that device
> properties can be passed from the firmware.
> 
> Signed-off-by: Rajat Jain <rajatja@google.com>
> ---
> v2: Remove the Change-Id from the commit log
> 
>  drivers/input/serio/i8042-x86ia64io.h | 1 +
>  drivers/input/serio/i8042.c           | 3 +++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
> index dc974c288e880..ed9ec4310d976 100644
> --- a/drivers/input/serio/i8042-x86ia64io.h
> +++ b/drivers/input/serio/i8042-x86ia64io.h
> @@ -927,6 +927,7 @@ static int i8042_pnp_kbd_probe(struct pnp_dev *dev, const struct pnp_device_id *
>  	}
>  	i8042_pnp_id_to_string(dev->id, i8042_kbd_firmware_id,
>  			       sizeof(i8042_kbd_firmware_id));
> +	i8042_kbd_fwnode = dev_fwnode(&dev->dev);
>  
>  	/* Keyboard ports are always supposed to be wakeup-enabled */
>  	device_set_wakeup_enable(&dev->dev, true);
> diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
> index 20ff2bed3917a..0dddf273afd94 100644
> --- a/drivers/input/serio/i8042.c
> +++ b/drivers/input/serio/i8042.c
> @@ -21,6 +21,7 @@
>  #include <linux/i8042.h>
>  #include <linux/slab.h>
>  #include <linux/suspend.h>
> +#include <linux/property.h>
>  
>  #include <asm/io.h>
>  
> @@ -124,6 +125,7 @@ MODULE_PARM_DESC(unmask_kbd_data, "Unconditional enable (may reveal sensitive da
>  static bool i8042_bypass_aux_irq_test;
>  static char i8042_kbd_firmware_id[128];
>  static char i8042_aux_firmware_id[128];
> +static struct fwnode_handle *i8042_kbd_fwnode;
>  
>  #include "i8042.h"
>  
> @@ -1335,6 +1337,7 @@ static int __init i8042_create_kbd_port(void)
>  	strlcpy(serio->phys, I8042_KBD_PHYS_DESC, sizeof(serio->phys));
>  	strlcpy(serio->firmware_id, i8042_kbd_firmware_id,
>  		sizeof(serio->firmware_id));
> +	set_primary_fwnode(&serio->dev, i8042_kbd_fwnode);

Rafael, do you have any concerns here? We want to be able to access
properties assigned to KBC or similar device in ACPI. Serio port devices
in i8042 essentially mirror the 2 PNP (typically called KBC, PS2K or
PS2M) devices in ACPI.

Thanks.

-- 
Dmitry

      parent reply	other threads:[~2020-03-26 21:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-24 12:35 [PATCH v2 1/5] input/serio/i8042: Attach fwnode to serio i8042 kbd device Rajat Jain
2020-03-24 12:35 ` [PATCH v2 2/5] Input: atkbd: Expose function row physical map to userspace Rajat Jain
2020-03-26 21:27   ` Dmitry Torokhov
2020-03-26 22:18     ` Rajat Jain
2020-03-24 12:35 ` [PATCH v2 3/5] dt-bindings: input/atkbd.txt: Add binding for "function-row-physmap" Rajat Jain
2020-03-24 12:35 ` [PATCH v2 4/5] Input: atkbd: Receive and use physcode->keycode mapping from FW Rajat Jain
2020-03-26 21:20   ` Dmitry Torokhov
2020-03-27  1:37     ` Rajat Jain
2020-03-24 12:35 ` [PATCH v2 5/5] dt-bindings: input/atkbd.txt: Add binding info for "keymap" property Rajat Jain
2020-03-26 21:28   ` Dmitry Torokhov
2020-03-26 21:25 ` Dmitry Torokhov [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=20200326212505.GI75430@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=allison@lohutok.net \
    --cc=bleung@google.com \
    --cc=dbehr@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dlaurie@google.com \
    --cc=dtor@google.com \
    --cc=furquan@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=info@metux.net \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rajatja@google.com \
    --cc=rajatxjain@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=swboyd@chromium.org \
    --cc=tglx@linutronix.de \
    --cc=zentaro@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.