From: Ben Gamari <firstname.lastname@example.org> To: Grant Likely <email@example.com> Cc: beagleboard <firstname.lastname@example.org>, linux-omap <email@example.com>, David Brownell <firstname.lastname@example.org>, Michael Hennerich <email@example.com>, spi-devel-general <firstname.lastname@example.org>, Eric Miao <email@example.com> Subject: Re: [PATCH] mcspi: Add support for GPIO chip select lines Date: Sun, 13 Feb 2011 17:07:54 -0500 [thread overview] Message-ID: <firstname.lastname@example.org> (raw) In-Reply-To: <20110212083324.GA17755@angua.secretlab.ca> On Sat, 12 Feb 2011 01:33:24 -0700, Grant Likely <email@example.com> wrote: > (Sorry for the really laggy reply) > No worries, I was just starting to think about this again myself. > I don't see it being that big a deal. gpio drivers are pretty > lightweight and it is fine to have domain-specific limitations on how > gpios for a particular "gpio controller" behave. In your example, if > the hardware doesn't support enabling 2 CS pins at once, then you make > a choice, either setting one when the other is already set simply does > not work; or it could reset the other state. Either choice would be > fine. The SPI driver must do the right thing regardless and deselect > the previous CS line before enabling a new one. > Having now finally having had a chance to implement a gpio_chip driver, I agree. It's quite simple and seems to fill the need pretty well > The other alternative would be to implement a new SPI chipselect > common infrastructure, but IMO, that would just end up looking like a > duplication of the gpio infrastructure. > I think you are probably right. GPIO seems to be a good fit. Patch coming shortly. I use spi_board_info.controller_data to pass the gpio number to the controller which doesn't seem like the best way forward, but I wasn't sure how else to proceed. Also, since the gpio numbers are dynamically determined spi_board_info.controller_data must be filled in at runtime, which is also a bit of a bummer (although not easily solved as far as I can tell). Let me know what you think. - Ben
next prev parent reply other threads:[~2011-02-13 22:07 UTC|newest] Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-01-20 19:47 (no subject) Ben Gamari 2010-01-21 0:04 ` Ben Dooks 2010-01-21 0:04 ` (no subject) Ben Dooks 2010-01-21 0:04 ` Ben Dooks 2010-01-22 15:53 ` Re: Ben Gamari 2010-01-28 4:10 ` McSPI questions pertaining to GPIO chip select support Ben Gamari [not found] ` <1264651770-sup-5197@ben-laptop> 2010-01-28 4:15 ` Bill Gatliff 2010-01-28 4:25 ` Ben Gamari 2010-01-28 4:27 ` Bill Gatliff 2010-01-28 4:33 ` jassi brar [not found] ` <1b68c6791001272033q60dd31dbif4de285cd9bac83d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2010-01-29 0:32 ` Ben Gamari 2010-01-29 1:09 ` jassi brar [not found] ` <1b68c6791001281709l7d11da30lee486632e85b99cb-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2010-01-29 1:58 ` Ben Gamari 2010-12-21 17:56 ` [RFC PATCH] GPIO chip select support for McSPI Ben Gamari 2010-12-21 17:56 ` [PATCH] mcspi: Add support for GPIO chip select lines Ben Gamari [not found] ` <firstname.lastname@example.org> 2010-12-23 19:59 ` Tony Lindgren 2010-12-23 21:38 ` Grant Likely 2010-12-23 23:09 ` Ben Gamari 2010-12-24 0:37 ` Grant Likely 2010-12-24 2:27 ` Ben Gamari 2010-12-24 3:28 ` Grant Likely 2010-12-24 6:05 ` Ben Gamari 2011-02-12 8:33 ` Grant Likely 2011-02-13 22:07 ` Ben Gamari [this message] 2011-08-30 10:14 ` McSPI questions pertaining to GPIO chip select support Raju Sana 2011-08-30 13:50 ` Ben Gamari 2011-08-30 13:50 ` [PATCH] mcspi: Add support for GPIO chip select lines Ben Gamari 2011-08-30 13:52 ` [PATCH] beagledaq: Hack in cs_gpios Ben Gamari [not found] ` <1314712343-27367-1-git-send-email-bgamari.foss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2011-09-05 12:42 ` Raju Sana
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 \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --subject='Re: [PATCH] mcspi: Add support for GPIO chip select lines' \ /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
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).