Re: [RFC 7/7] [media] rc: add support for IR LEDs driven through SPI

2016-07-21 Thread Andi Shyti
Hi Sean, > > > > + ret = regulator_enable(idata->regulator); > > > > + if (ret) > > > > + return ret; > > > > + > > > > + mutex_lock(>mutex); > > > > + idata->xfer.len = n; > > > > + idata->xfer.tx_buf = buffer; > > > > + mutex_unlock(>mutex); > >

Re: [RFC 7/7] [media] rc: add support for IR LEDs driven through SPI

2016-07-21 Thread Sean Young
Hi Andi, On Thu, Jul 21, 2016 at 10:09:26AM +0900, Andi Shyti wrote: > > > + ret = regulator_enable(idata->regulator); > > > + if (ret) > > > + return ret; > > > + > > > + mutex_lock(>mutex); > > > + idata->xfer.len = n; > > > + idata->xfer.tx_buf = buffer; > > > + mutex_unlock(>mutex); >

Re: [RFC 7/7] [media] rc: add support for IR LEDs driven through SPI

2016-07-20 Thread Andi Shyti
Hi Sean, > > + int ret; > > + struct ir_spi_data *idata = (struct ir_spi_data *) dev->priv; > > No cast needed. yes, thanks. > > + ret = regulator_enable(idata->regulator); > > + if (ret) > > + return ret; > > + > > + mutex_lock(>mutex); > > + idata->xfer.len = n; > > +

Re: [RFC 7/7] [media] rc: add support for IR LEDs driven through SPI

2016-07-19 Thread Sean Young
On Wed, Jul 20, 2016 at 12:56:58AM +0900, Andi Shyti wrote: > The ir-spi is a simple device driver which supports the > connection between an IR LED and the MOSI line of an SPI device. > > The driver, indeed, uses the SPI framework to stream the raw data > provided by userspace through a

[RFC 7/7] [media] rc: add support for IR LEDs driven through SPI

2016-07-19 Thread Andi Shyti
The ir-spi is a simple device driver which supports the connection between an IR LED and the MOSI line of an SPI device. The driver, indeed, uses the SPI framework to stream the raw data provided by userspace through a character device. The chardev is handled by the LIRC framework and its