linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff LaBundy <jeff@labundy.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Bastien Nocera <hadess@hadess.net>,
	Gregor Riepl <onitake@gmail.com>,
	linux-input@vger.kernel.org
Subject: Re: [PATCH resend 3/3] Input: goodix - Add a settings module-parameter
Date: Wed, 25 Jan 2023 22:53:25 -0600	[thread overview]
Message-ID: <Y9IHRS91VA6AqMbF@nixie71> (raw)
In-Reply-To: <20230125105416.17406-4-hdegoede@redhat.com>

On Wed, Jan 25, 2023 at 11:54:16AM +0100, Hans de Goede wrote:
> Add a settings module-parameter which can be allowed to specify/override
> various device-properties.
> 
> Usuually Goodix touchscreens on x86 devices (where there is no devicetree
> to specify the properties) just work. But in some cases the touchscreen is
> mounted 90 or 180 degrees rotated vs the display, requiring setting the
> touchscreen-x/y-inverted or touchscreen-swapped-x-y properties.
> 
> Being able to specify the necessary properties through a module parameter,
> allows users of new device-models to help us with bringing up support for
> new devices without them needing to do a local kernel-build just to modify
> these settings.
> 
> Reviewed-by: Bastien Nocera <hadess@hadess.net>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Reviewed-by: Jeff LaBundy <jeff@labundy.com>

> ---
>  drivers/input/touchscreen/goodix.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c
> index 620f5ec0962f..a105dee04156 100644
> --- a/drivers/input/touchscreen/goodix.c
> +++ b/drivers/input/touchscreen/goodix.c
> @@ -53,6 +53,10 @@
>  #define ACPI_GPIO_SUPPORT
>  #endif
>  
> +static char *settings;
> +module_param(settings, charp, 0444);
> +MODULE_PARM_DESC(settings, "Override touchscreen settings using a ; separated key=value list, e.g. \"touchscreen-fuzz-x=5;touchscreen-fuzz-y=5;touchscreen-swapped-x-y\"");
> +
>  struct goodix_chip_id {
>  	const char *id;
>  	const struct goodix_chip_data *data;
> @@ -1197,7 +1201,8 @@ static int goodix_configure_dev(struct goodix_ts_data *ts)
>  	goodix_read_config(ts);
>  
>  	/* Try overriding touchscreen parameters via device properties */
> -	touchscreen_parse_properties(ts->input_dev, true, &ts->prop);
> +	touchscreen_parse_properties_with_settings(ts->input_dev, true,
> +						   &ts->prop, settings);
>  
>  	if (!ts->prop.max_x || !ts->prop.max_y || !ts->max_touch_num) {
>  		if (!ts->reset_controller_at_probe &&
> -- 
> 2.39.0
> 

      reply	other threads:[~2023-01-26  4:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-25 10:54 [PATCH resend 0/3] Input: touchscreen - settings module-param support Hans de Goede
2023-01-25 10:54 ` [PATCH resend 1/3] Input: touchscreen - Extend touchscreen_parse_properties() to allow overriding settings with a module option Hans de Goede
2023-01-26  4:41   ` Jeff LaBundy
2023-01-25 10:54 ` [PATCH resend 2/3] Input: silead - Add a settings module-parameter Hans de Goede
2023-01-26  4:51   ` Jeff LaBundy
2023-01-26  9:45     ` Hans de Goede
2023-01-26 17:53       ` Gregor Riepl
2023-01-25 10:54 ` [PATCH resend 3/3] Input: goodix " Hans de Goede
2023-01-26  4:53   ` Jeff LaBundy [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=Y9IHRS91VA6AqMbF@nixie71 \
    --to=jeff@labundy.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hadess@hadess.net \
    --cc=hdegoede@redhat.com \
    --cc=linux-input@vger.kernel.org \
    --cc=onitake@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;
as well as URLs for NNTP newsgroup(s).