mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ardelean, Alexandru" <alexandru.Ardelean@analog.com>
To: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "dmitry.torokhov@gmail.com" <dmitry.torokhov@gmail.com>,
	"lars@metafoo.de" <lars@metafoo.de>
Subject: Re: [PATCH 1/2] input: adp5589: Add default platform data
Date: Tue, 29 Oct 2019 13:57:03 +0000	[thread overview]
Message-ID: <056ce7661ecf24049982d9f61bed836b4580d888.camel@analog.com> (raw)
In-Reply-To: <20191029112836.9188-1-alexandru.ardelean@analog.com>

On Tue, 2019-10-29 at 13:28 +0200, Alexandru Ardelean wrote:
> From: Lars-Peter Clausen <lars@metafoo.de>
> 

Disregard this series.
I just noticed that it needs to be re-visited.
Some things have changed, and I didn't notice.

Apologies for the noise.
Alex


> If no platform data is supplied use a dummy platform data that configures
> the device in GPIO only mode.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> ---
>  drivers/input/keyboard/adp5589-keys.c | 14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/input/keyboard/adp5589-keys.c
> b/drivers/input/keyboard/adp5589-keys.c
> index e7d58e7f0257..ed2c13bef1b7 100644
> --- a/drivers/input/keyboard/adp5589-keys.c
> +++ b/drivers/input/keyboard/adp5589-keys.c
> @@ -987,6 +987,14 @@ static void adp5589_keypad_remove(struct
> adp5589_kpad *kpad)
>  	}
>  }
>  
> +static const struct adp5589_gpio_platform_data
> adp5589_default_gpio_pdata = {
> +	.gpio_start = -1,
> +};
> +
> +static const struct adp5589_kpad_platform_data adp5589_default_pdata = {
> +	.gpio_data = &adp5589_default_gpio_pdata,
> +};
> +
>  static int adp5589_probe(struct i2c_client *client,
>  			 const struct i2c_device_id *id)
>  {
> @@ -1002,10 +1010,8 @@ static int adp5589_probe(struct i2c_client
> *client,
>  		return -EIO;
>  	}
>  
> -	if (!pdata) {
> -		dev_err(&client->dev, "no platform data?\n");
> -		return -EINVAL;
> -	}
> +	if (!pdata)
> +		pdata = &adp5589_default_pdata;
>  
>  	kpad = kzalloc(sizeof(*kpad), GFP_KERNEL);
>  	if (!kpad)

      parent reply	other threads:[~2019-10-29 13:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-29 11:28 Alexandru Ardelean
2019-10-29 11:28 ` [PATCH 2/2] input: adp5589: Add basic devicetree support Alexandru Ardelean
2019-10-31  3:06   ` kbuild test robot
2019-10-29 13:57 ` Ardelean, Alexandru [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=056ce7661ecf24049982d9f61bed836b4580d888.camel@analog.com \
    --to=alexandru.ardelean@analog.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=lars@metafoo.de \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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®