Song, Barry wrote on 2010-05-26: > I don't think that fits with spi spec. For spi, changing CS means two > different spi_message in one spi_transfer. You should use two > spi_message with cs_change=1 for those devices. Thanks barry
This means we can drop the bfin_spi_adc driver and remove the autobuffer DMA hack from the SPI bus driver as well. -Michael > > > -----Original Message----- From: Hennerich, Michael > [mailto:[email protected]] Sent: 5/26/2010 (星期三) 3:45 下午 To: > [email protected]; linux-kernel- [email protected] > Subject: RE: [Linux-kernel-commits] [8604] > trunk/drivers/spi/spi_bfin5xx.c: [#5903], limit users to use gpio cs > while CHPA = 0 > > I don't think that's a good idea. > Example - consider reading from an 16-bit SPI ADC in DMA mode. > In DMA mode there is nothing that controls the SSEL except the SPI > itself when it is in MODE0. > However these ADCs need the SSEL de-asserted every 8/16-bit, and you > don't want to do this manually by core interactions. > > Also this breaks some of our touch screen drivers, that use 16bit > transfers and work ok in MODE0. > > Greetings, > Michael > > Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen > Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 4036 > Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif > > From: [email protected] [mailto:linux- > [email protected]] On Behalf Of > [email protected] Sent: Tuesday, April 06, 2010 5:36 AM To: > [email protected] Subject: > [Linux-kernel-commits] [8604] trunk/drivers/spi/spi_bfin5xx.c: [#5903], > limit users to use gpio cs while CHPA = 0 > > Revision > 8604 > Author > bhsong > Date > 2010-04-05 23:36:24 -0400 (Mon, 05 Apr 2010) Log Message [#5903], > limit users to use gpio cs while CHPA = 0 Modified Paths ? > trunk/drivers/spi/spi_bfin5xx.c Diff > Modified: trunk/drivers/spi/spi_bfin5xx.c (8603 => 8604) > > --- trunk/drivers/spi/spi_bfin5xx.c 2010-04-02 16:00:12 UTC (rev > 8603) +++ trunk/drivers/spi/spi_bfin5xx.c 2010-04-06 03:36:24 UTC > (rev 8604) @@ -1139,9 +1139,13 @@ > */ > chip->baud = hz_to_spi_baud(spi->max_speed_hz); > chip->chip_select_num = spi->chip_select; > - if (chip->chip_select_num < MAX_CTRL_CS) > + if (chip->chip_select_num < MAX_CTRL_CS) { > + if (!(spi->mode & SPI_CPHA)) { > + dev_err(&spi->dev, "unsupported non-gpio > chipselect while CPHA is 0\n"); > + goto error; > + } > chip->flag = (1 << spi->chip_select) << 8; > - else > + } else > chip->cs_gpio = chip->chip_select_num - MAX_CTRL_CS; > if (chip->enable_dma && chip->pio_interrupt) { Greetings, Michael Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 4036 Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif _______________________________________________ Linux-kernel-commits mailing list [email protected] https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits
