From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:42404 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751743AbdHGWQG (ORCPT ); Mon, 7 Aug 2017 18:16:06 -0400 Date: Mon, 7 Aug 2017 15:16:05 -0700 From: Greg KH To: Sean Young Cc: anton@samba.org, mchehab@s-opensource.com, stable@vger.kernel.org Subject: Re: FAILED: patch "[PATCH] [media] ir-spi: Fix issues with lirc API" failed to apply to 4.12-stable tree Message-ID: <20170807221605.GA8002@kroah.com> References: <150072972285160@kroah.com> <20170729112444.h4mfbyxusufahqdb@gofer.mess.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170729112444.h4mfbyxusufahqdb@gofer.mess.org> Sender: stable-owner@vger.kernel.org List-ID: On Sat, Jul 29, 2017 at 12:24:45PM +0100, Sean Young wrote: > > From: Anton Blanchard > Subject: [PATCH] [media] ir-spi: Fix issues with lirc API > > The ir-spi driver has 2 issues which prevents it from working with > lirc: > > 1. The ir-spi driver uses 16 bits of SPI data to create one cycle of > the waveform. As such our SPI clock needs to be 16x faster than the > carrier frequency. > > The driver is inconsistent in how it currently handles this. It > initializes it to the carrier frequency: > > But the commit message has some example code which initialises it > to 16x the carrier frequency: > > val = 608000; > ret = ioctl(fd, LIRC_SET_SEND_CARRIER, &val); > > To maintain compatibility with lirc, always do the frequency adjustment > in the driver. > > 2. lirc presents pulses in microseconds, but the ir-spi driver treats > them as cycles of the carrier. Similar to other lirc drivers, do the > conversion with DIV_ROUND_CLOSEST(). > > Fixes: fe052da49201 ("[media] rc: add support for IR LEDs driven through SPI") > > Cc: stable@vger.kernel.org > Signed-off-by: Anton Blanchard > Signed-off-by: Sean Young > Signed-off-by: Mauro Carvalho Chehab > --- > drivers/media/rc/ir-spi.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) Thanks for the backport. greg k-h