From: Baruch Siach <baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
To: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Feng Tang <feng.tang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH RFC 3/4] spi: dw: add support for gpio controlled chip select
Date: Thu, 23 Jan 2014 16:05:46 +0200 [thread overview]
Message-ID: <20140123140546.GG12751@tarshish> (raw)
In-Reply-To: <20140123132623.GN17314-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
Hi Mark,
On Thu, Jan 23, 2014 at 01:26:23PM +0000, Mark Brown wrote:
> On Thu, Jan 23, 2014 at 03:05:58PM +0200, Baruch Siach wrote:
> > Signed-off-by: Baruch Siach <baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
>
> If you convert to the generic queue then there's generic support for
> managing a GPIO based /CS if you set cs_gpio in the spi_device. We
> should extend that for GPIO descriptors too.
Thank. This further simplifies things. AFAICS the generic gpio chip select
code does not request the GPIO. Is there a reason for that?
> > + if (gpio_is_valid(spi->cs_gpio)) {
> > + ret = gpio_request(spi->cs_gpio, dev_name(&spi->dev));
> > + if (ret)
> > + return ret;
> > + ret = gpio_direction_output(spi->cs_gpio,
> > + !(spi->mode & SPI_CS_HIGH));
>
> devm_gpio_request_one().
Right.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org - tel: +972.2.679.5364, http://www.tkos.co.il -
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-01-23 14:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-23 13:05 [PATCH RFC 0/4] spi: dw: device tree and generic queue support Baruch Siach
[not found] ` <cover.1390481412.git.baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
2014-01-23 13:05 ` [PATCH RFC 1/4] spi: dw-mmio: allow multiple instances Baruch Siach
[not found] ` <74a507ce4370729cbc31c7e8d182821287ffcca1.1390481413.git.baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
2014-01-23 19:50 ` Mark Brown
2014-01-23 13:05 ` [PATCH RFC 2/4] spi: dw-mmio: add device tree support Baruch Siach
[not found] ` <4859e838c549175fbff8d5a6a70f5a02ce51008c.1390481413.git.baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
2014-01-23 13:20 ` Mark Brown
2014-01-23 13:05 ` [PATCH RFC 3/4] spi: dw: add support for gpio controlled chip select Baruch Siach
[not found] ` <cc63df805aa126eede50aa11b3fb3c5bdef67f65.1390481413.git.baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
2014-01-23 13:26 ` Mark Brown
[not found] ` <20140123132623.GN17314-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-01-23 14:05 ` Baruch Siach [this message]
2014-01-23 16:32 ` Mark Brown
2014-01-26 8:01 ` Baruch Siach
2014-01-23 13:05 ` [PATCH RFC 4/4] spi: dw: migrate to generic queue infrastructure Baruch Siach
[not found] ` <cb13f97edb9250d51bc03d27bcc3ddda93821bf9.1390481413.git.baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
2014-01-23 19:51 ` Mark Brown
[not found] ` <20140123195148.GL11727-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-01-23 20:07 ` Baruch Siach
2014-01-23 20:13 ` Mark Brown
[not found] ` <20140123201306.GP11727-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-01-24 6:36 ` Baruch Siach
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=20140123140546.GG12751@tarshish \
--to=baruch-nswtu9s1w3p6gbpvegmw2w@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=feng.tang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 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.