All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Datta, Shubhrajyoti" <shubhrajyoti@ti.com>
To: Sundar R IYER <sundar.iyer@stericsson.com>
Cc: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	STEricsson_nomadik_linux <STEricsson_nomadik_linux@list.st.com>
Subject: RE: [PATCH v3 1/1] input: add support for Nomadik SKE keypad controller
Date: Mon, 6 Sep 2010 21:11:09 +0530	[thread overview]
Message-ID: <0680EC522D0CC943BC586913CF3768C003C2018609@dbde02.ent.ti.com> (raw)
In-Reply-To: <33A307AF30D7BF4F811B1568FE7A9B181C7DC680@EXDCVYMBSTM006.EQ1STM.local>



> -----Original Message-----
> From: Sundar R IYER [mailto:sundar.iyer@stericsson.com]
> Sent: Monday, September 06, 2010 8:46 PM
> To: Datta, Shubhrajyoti
> Cc: linux-input@vger.kernel.org; STEricsson_nomadik_linux
> Subject: RE: [PATCH v3 1/1] input: add support for Nomadik SKE keypad
> controller
> 
> Hi,
> 
> >-----Original Message-----
> >From: Datta, Shubhrajyoti [mailto:shubhrajyoti@ti.com]
> >> +     /* go through board initialiazation helpers */
> >> +     if (keypad->board->init) {
> >Did not understand this
> 
> >-----Original Message-----
> >From: Dmitry Torokhov [mailto:dmitry.torokhov@gmail.com]
> >> > > +
> >> > > +     if (!keypad->board->init) {
> >> > > +             dev_err(&pdev->dev, "NULL board initialization
> helper\n");
> >> >
> >> > Could be checked earlier. Also, does it have to be an error?
> >> >
> >>
> >> The platform code takes care to request the GPIOs and the GPIO
> configurations.
> >> Hence I return error in case the board configurations dont get
> completed.
> >>
> >
> >PLanform author migth opt to do the initialization earlier, together
> >with teh rest of GPIO configuration so it is all ready by the time the
> >driver is loaded. I think we should give such an option.
> 
> I interpreted Dmitry's above suggestion as allowing the driver to proceed
> in case platform
> Initialization is not done.
> 
> The [PATCH 2/2] ux500: add platform data for Nomadik SKE keypad controller
> adds this platform
> data which is configuration of the GPIO pins like this.
> 
> +/*
> + * ske_set_gpio_row: request and set gpio rows  */ static int
> +ske_set_gpio_row(int gpio) {
> +	int ret;
> +
> +	ret = gpio_request(gpio, "ske-kp");
> +	if (ret < 0) {
> +		pr_err("ske_set_gpio_row: gpio request failed\n");
> +		return ret;
> +	}
> +
> +	ret = gpio_direction_output(gpio, 1);
> +	if (ret < 0) {
> +		pr_err("ske_set_gpio_row: gpio direction failed\n");
> +		gpio_free(gpio);
> +	}
> +
> +	return ret;
> +}
> +
> +/*
> + * ske_kp_init - enable the gpio configuration  */ static int
> +ske_kp_init(void) {
> +	int ret, i;
> +
> +	for (i = 0; i < SKE_KPD_MAX_ROWS; i++) {
> +		ret = ske_set_gpio_row(ske_kp_rows[i]);
> +		if (ret < 0) {
> +			pr_err("ske_kp_init: failed init\n");
> +			return ret;
> +		}
> +	}
> +
> +	return 0;
> +}
> 
> And hence I need to call this board init to make sure that I get the GPIO
> lines
> for my device.
> 
> >> +
> >> +     if (keypad->board->exit())
> >> +             keypad->board->exit();
> >What does this exit function do?
> >Are you sure the exit function does not need the keypad clock?

     if (keypad->board->exit)
             keypad->board->exit();
Is this you intended?
> >
> 
> Although I haven't added a exit function to the platform data, but from
> the platform
> code posted from above, it is clear that there are no controller
> dependencies for the
> board exit function.
> 
> Regards,
> Sundar

  reply	other threads:[~2010-09-06 15:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-06 12:48 [PATCH v3 1/1] input: add support for Nomadik SKE keypad controller Sundar Iyer
2010-09-06 15:07 ` Datta, Shubhrajyoti
2010-09-06 15:16   ` Sundar R IYER
2010-09-06 15:41     ` Datta, Shubhrajyoti [this message]
2010-09-06 15:43       ` Sundar R IYER
2010-09-07  6:37 ` Dmitry Torokhov
2010-09-07  6:49   ` Sundar R IYER
2010-09-07 14:01 ` Trilok Soni
2010-09-08 12:55   ` Sundar R IYER
2010-09-08 12:58     ` Trilok Soni
2010-09-08 14:19       ` Linus Walleij
2010-09-08 15:46         ` Dmitry Torokhov
2010-09-09  4:22           ` Sundar R IYER
2010-09-13  7:31             ` Sundar R IYER

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=0680EC522D0CC943BC586913CF3768C003C2018609@dbde02.ent.ti.com \
    --to=shubhrajyoti@ti.com \
    --cc=STEricsson_nomadik_linux@list.st.com \
    --cc=linux-input@vger.kernel.org \
    --cc=sundar.iyer@stericsson.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.