From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Martin Sperl <kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
lee-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-rpi-kernel
<linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH/RFC 6/6] spi: bcm2835: set gpio-cs to high state prior to any
Date: Mon, 30 Mar 2015 21:35:45 -0600 [thread overview]
Message-ID: <551A1611.1090708@wwwdotorg.org> (raw)
In-Reply-To: <F17E5383-B75E-4884-9673-0C9E95750E4A-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
On 03/30/2015 01:25 PM, Martin Sperl wrote:
>
>> On 30.03.2015, at 06:28, Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
>>
>> On Sun, Mar 29, 2015 at 04:03:28PM +0200, Martin Sperl wrote:
>>
>>> A variation of this probably should get moved into spi_register_master
>>> to fix this for other spi-controller as well.
>>
>> Yes, this is the wrong place to solve this.
>
> So should we move that into spi_register_master?
> My question for completeness remains: how do we get the devices
> from dt or whatever while we are still registering the master?
>
> Also I am still missing a bit of the big picture and vision how
> to implement it taking all different HW/setup cases into account.
>
> That is why I have put it as an RFC - mostly to get the issue some
> exposure and some ideas.
I suspect the solution is simply not to have the pinctrl node set the CS
pins to GPIO_OUT, but rather rely on gpio_request() ->
bcm2835_gpio_request() -> bcm2835_pmx_gpio_set_direction() setting up
the pinmux function for any GPIOs that are requested. Presumably, the CS
GPIO for each chip is only requested when the DT node for the SPI device
(not SPI controller device) has been parsed, so the correct GPIO CS
value can be passed to gpio_request()/gpio_direction_output()?
--
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:[~2015-03-31 3:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-29 14:03 [PATCH/RFC 6/6] spi: bcm2835: set gpio-cs to high state prior to any Martin Sperl
[not found] ` <DA037FBB-56A7-4379-88F0-650367BBB822-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2015-03-30 4:28 ` Mark Brown
[not found] ` <20150330042821.GD1568-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2015-03-30 19:25 ` Martin Sperl
[not found] ` <F17E5383-B75E-4884-9673-0C9E95750E4A-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2015-03-31 3:35 ` Stephen Warren [this message]
[not found] ` <551A1611.1090708-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-03-31 5:56 ` Martin Sperl
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=551A1611.1090708@wwwdotorg.org \
--to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org \
--cc=lee-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@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.