Re: [patch 2.6.20-rc2] gpio_direction_output() needs an initial value
On Thursday 01 March 2007 9:48 pm, Andrew Victor wrote: > hi David, > > > It's been pointed out that output GPIOs should have an initial value, to > > avoid signal glitching ... among other things, it can be some time before > > a driver is ready. This patch corrects that oversight, fixing > > For the AT91 changes: > Acked-by: Andrew Victor <[EMAIL PROTECTED]> > > > > --- g26.orig/drivers/spi/atmel_spi.c2007-02-28 12:47:43.0 > > -0800 > > +++ g26/drivers/spi/atmel_spi.c 2007-03-01 15:29:30.0 -0800 > > > - gpio_direction_output(npcs_pin); > > + gpio_direction_output(npcs_pin, !(spi->mode & SPI_CS_HIGH)); > > } > > As mentioned previously (by Walter Tuppa), wouldn't it be better to just > change this to: > cs_deactivate(spi); That *does* deactivate the chipselect, as the initial value. Given this function signature change, some initial value must be specified, and that expression uses the inactive value... - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 2.6.20-rc2] gpio_direction_output() needs an initial value
On Thu, 1 Mar 2007 18:25:09 -0800 David Brownell <[EMAIL PROTECTED]> wrote: > It's been pointed out that output GPIOs should have an initial value, to > avoid signal glitching ... among other things, it can be some time before > a driver is ready. This patch corrects that oversight, fixing > > - documentation > - platforms supporting the GPIO interface > - users of that call (just one for now, others are pending) > > Note that most platforms are clear about the hardware letting the output > value be set before the pin direction is changed, but the s3c241x docs > are vague on that topic ... so those chips might not avoid the glitches. > > Signed-off-by: David Brownell <[EMAIL PROTECTED]> Acked-by: Haavard Skinnemoen <[EMAIL PROTECTED]> Thanks, Dave. Haavard - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 2.6.20-rc2] gpio_direction_output() needs an initial value
On Thu, 1 Mar 2007 18:25:09 -0800 David Brownell [EMAIL PROTECTED] wrote: It's been pointed out that output GPIOs should have an initial value, to avoid signal glitching ... among other things, it can be some time before a driver is ready. This patch corrects that oversight, fixing - documentation - platforms supporting the GPIO interface - users of that call (just one for now, others are pending) Note that most platforms are clear about the hardware letting the output value be set before the pin direction is changed, but the s3c241x docs are vague on that topic ... so those chips might not avoid the glitches. Signed-off-by: David Brownell [EMAIL PROTECTED] Acked-by: Haavard Skinnemoen [EMAIL PROTECTED] Thanks, Dave. Haavard - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 2.6.20-rc2] gpio_direction_output() needs an initial value
On Thursday 01 March 2007 9:48 pm, Andrew Victor wrote: hi David, It's been pointed out that output GPIOs should have an initial value, to avoid signal glitching ... among other things, it can be some time before a driver is ready. This patch corrects that oversight, fixing For the AT91 changes: Acked-by: Andrew Victor [EMAIL PROTECTED] --- g26.orig/drivers/spi/atmel_spi.c2007-02-28 12:47:43.0 -0800 +++ g26/drivers/spi/atmel_spi.c 2007-03-01 15:29:30.0 -0800 - gpio_direction_output(npcs_pin); + gpio_direction_output(npcs_pin, !(spi-mode SPI_CS_HIGH)); } As mentioned previously (by Walter Tuppa), wouldn't it be better to just change this to: cs_deactivate(spi); That *does* deactivate the chipselect, as the initial value. Given this function signature change, some initial value must be specified, and that expression uses the inactive value... - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 2.6.20-rc2] gpio_direction_output() needs an initial value
> It's been pointed out that output GPIOs should have an initial value, to > avoid signal glitching ... among other things, it can be some time before > a driver is ready. This patch corrects that oversight, fixing > > - documentation > - platforms supporting the GPIO interface > - users of that call (just one for now, others are pending) > > Note that most platforms are clear about the hardware letting the output > value be set before the pin direction is changed, but the s3c241x docs > are vague on that topic ... so those chips might not avoid the glitches. > > Signed-off-by: David Brownell <[EMAIL PROTECTED]> Acked-by: Milan Svoboda <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 2.6.20-rc2] gpio_direction_output() needs an initial value
hi David, > It's been pointed out that output GPIOs should have an initial value, to > avoid signal glitching ... among other things, it can be some time before > a driver is ready. This patch corrects that oversight, fixing For the AT91 changes: Acked-by: Andrew Victor <[EMAIL PROTECTED]> > --- g26.orig/drivers/spi/atmel_spi.c 2007-02-28 12:47:43.0 -0800 > +++ g26/drivers/spi/atmel_spi.c 2007-03-01 15:29:30.0 -0800 > - gpio_direction_output(npcs_pin); > + gpio_direction_output(npcs_pin, !(spi->mode & SPI_CS_HIGH)); > } As mentioned previously (by Walter Tuppa), wouldn't it be better to just change this to: cs_deactivate(spi); Regards, Andrew Victor - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 2.6.20-rc2] gpio_direction_output() needs an initial value
hi David, It's been pointed out that output GPIOs should have an initial value, to avoid signal glitching ... among other things, it can be some time before a driver is ready. This patch corrects that oversight, fixing For the AT91 changes: Acked-by: Andrew Victor [EMAIL PROTECTED] --- g26.orig/drivers/spi/atmel_spi.c 2007-02-28 12:47:43.0 -0800 +++ g26/drivers/spi/atmel_spi.c 2007-03-01 15:29:30.0 -0800 - gpio_direction_output(npcs_pin); + gpio_direction_output(npcs_pin, !(spi-mode SPI_CS_HIGH)); } As mentioned previously (by Walter Tuppa), wouldn't it be better to just change this to: cs_deactivate(spi); Regards, Andrew Victor - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 2.6.20-rc2] gpio_direction_output() needs an initial value
It's been pointed out that output GPIOs should have an initial value, to avoid signal glitching ... among other things, it can be some time before a driver is ready. This patch corrects that oversight, fixing - documentation - platforms supporting the GPIO interface - users of that call (just one for now, others are pending) Note that most platforms are clear about the hardware letting the output value be set before the pin direction is changed, but the s3c241x docs are vague on that topic ... so those chips might not avoid the glitches. Signed-off-by: David Brownell [EMAIL PROTECTED] Acked-by: Milan Svoboda [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/