Date: Tue, 19 Apr 2016 09:40:23 -0700 From: Adrian Chadd <adrian.chadd@gmail.com> To: Ruslan Bukin <br@freebsd.org> Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org> Subject: Re: svn commit: r298274 - head/sys/dev/spibus Message-ID: <CAJ-VmonyZR-CiPxceAvVzxDjL7WXDAix-Pmj2RRqp%2B9gj3u0hA@mail.gmail.com> In-Reply-To: <201604191539.u3JFdkHx048678@repo.freebsd.org> References: <201604191539.u3JFdkHx048678@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hm, why'd you do this? did you get it reviewed first? I'm about to write a kernel bitbang SPI driver that supports arbitrary GPIOs, and I was thinking of fleshing this out somewhat. -adrian On 19 April 2016 at 08:39, Ruslan Bukin <br@freebsd.org> wrote: > Author: br > Date: Tue Apr 19 15:39:46 2016 > New Revision: 298274 > URL: https://svnweb.freebsd.org/changeset/base/298274 > > Log: > Revert r298268 (Add optional chip_select/deselect methods). > None of supported hardware do require that. > > Modified: > head/sys/dev/spibus/spibus.c > head/sys/dev/spibus/spibus_if.m > > Modified: head/sys/dev/spibus/spibus.c > ============================================================================== > --- head/sys/dev/spibus/spibus.c Tue Apr 19 15:36:18 2016 (r298273) > +++ head/sys/dev/spibus/spibus.c Tue Apr 19 15:39:46 2016 (r298274) > @@ -185,24 +185,9 @@ spibus_hinted_child(device_t bus, const > static int > spibus_transfer_impl(device_t dev, device_t child, struct spi_command *cmd) > { > - > return (SPIBUS_TRANSFER(device_get_parent(dev), child, cmd)); > } > > -static int > -spibus_chip_select_impl(device_t dev, device_t child) > -{ > - > - return (SPIBUS_CHIP_SELECT(device_get_parent(dev), child)); > -} > - > -static int > -spibus_chip_deselect_impl(device_t dev, device_t child) > -{ > - > - return (SPIBUS_CHIP_DESELECT(device_get_parent(dev), child)); > -} > - > static device_method_t spibus_methods[] = { > /* Device interface */ > DEVMETHOD(device_probe, spibus_probe), > @@ -223,8 +208,6 @@ static device_method_t spibus_methods[] > > /* spibus interface */ > DEVMETHOD(spibus_transfer, spibus_transfer_impl), > - DEVMETHOD(spibus_chip_select, spibus_chip_select_impl), > - DEVMETHOD(spibus_chip_deselect, spibus_chip_deselect_impl), > > DEVMETHOD_END > }; > > Modified: head/sys/dev/spibus/spibus_if.m > ============================================================================== > --- head/sys/dev/spibus/spibus_if.m Tue Apr 19 15:36:18 2016 (r298273) > +++ head/sys/dev/spibus/spibus_if.m Tue Apr 19 15:39:46 2016 (r298274) > @@ -39,19 +39,3 @@ METHOD int transfer { > device_t child; > struct spi_command *cmd; > }; > - > -# > -# Assert chip select > -# > -METHOD int chip_select { > - device_t dev; > - device_t child; > -}; > - > -# > -# Deassert chip select > -# > -METHOD int chip_deselect { > - device_t dev; > - device_t child; > -}; >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmonyZR-CiPxceAvVzxDjL7WXDAix-Pmj2RRqp%2B9gj3u0hA>