From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751597AbdIRUBK (ORCPT ); Mon, 18 Sep 2017 16:01:10 -0400 Received: from mga07.intel.com ([134.134.136.100]:5548 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751457AbdIRUBI (ORCPT ); Mon, 18 Sep 2017 16:01:08 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,414,1500966000"; d="scan'208";a="129931530" Reply-To: thor.thayer@linux.intel.com Subject: Re: [[RESEND]PATCHv6 2/2] i2c: altera: Add Altera I2C Controller driver To: Wolfram Sang Cc: robh+dt@kernel.org, mark.rutland@arm.com, andy.shevchenko@gmail.com, davem@davemloft.net, gregkh@linuxfoundation.org, mchehab@kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <1505164640-26413-1-git-send-email-thor.thayer@linux.intel.com> <1505164640-26413-2-git-send-email-thor.thayer@linux.intel.com> <20170913205038.ndlkaivkdgxa3ee2@ninjato> From: Thor Thayer Message-ID: <3f9fe0a6-0e8d-7038-28e6-eacc6ed2e7ad@linux.intel.com> Date: Mon, 18 Sep 2017 15:04:34 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170913205038.ndlkaivkdgxa3ee2@ninjato> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/13/2017 03:50 PM, Wolfram Sang wrote: > On Mon, Sep 11, 2017 at 04:17:20PM -0500, thor.thayer@linux.intel.com wrote: >> From: Thor Thayer >> >> Add driver support for the Altera I2C Controller. The I2C >> controller is soft IP for use in FPGAs. >> >> Signed-off-by: Thor Thayer >> Reviewed-by: Andy Shevchenko >> --- > > Applied to for-next (will be in v4.14), thanks! > >> + if (finish) { >> + /* Wait for the Core to finish */ >> + ret = readl_poll_timeout_atomic(idev->base + ALTR_I2C_STATUS, > > I wonder a bit about polling in an interrupt handler (maybe threaded > irqs?) but we can fix that later, I think. > Yes, based on your previous feedback, I changed to a threaded IRQ as shown below. The altr_i2c_isr_quick wakes up this IRQ handler if the status is non-zero. + + ret = devm_request_threaded_irq(&pdev->dev, irq, altr_i2c_isr_quick, + altr_i2c_isr, IRQF_ONESHOT, + pdev->name, idev); Thanks for the review and applying the patch! From mboxrd@z Thu Jan 1 00:00:00 1970 From: thor.thayer@linux.intel.com (Thor Thayer) Date: Mon, 18 Sep 2017 15:04:34 -0500 Subject: [[RESEND]PATCHv6 2/2] i2c: altera: Add Altera I2C Controller driver In-Reply-To: <20170913205038.ndlkaivkdgxa3ee2@ninjato> References: <1505164640-26413-1-git-send-email-thor.thayer@linux.intel.com> <1505164640-26413-2-git-send-email-thor.thayer@linux.intel.com> <20170913205038.ndlkaivkdgxa3ee2@ninjato> Message-ID: <3f9fe0a6-0e8d-7038-28e6-eacc6ed2e7ad@linux.intel.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 09/13/2017 03:50 PM, Wolfram Sang wrote: > On Mon, Sep 11, 2017 at 04:17:20PM -0500, thor.thayer at linux.intel.com wrote: >> From: Thor Thayer >> >> Add driver support for the Altera I2C Controller. The I2C >> controller is soft IP for use in FPGAs. >> >> Signed-off-by: Thor Thayer >> Reviewed-by: Andy Shevchenko >> --- > > Applied to for-next (will be in v4.14), thanks! > >> + if (finish) { >> + /* Wait for the Core to finish */ >> + ret = readl_poll_timeout_atomic(idev->base + ALTR_I2C_STATUS, > > I wonder a bit about polling in an interrupt handler (maybe threaded > irqs?) but we can fix that later, I think. > Yes, based on your previous feedback, I changed to a threaded IRQ as shown below. The altr_i2c_isr_quick wakes up this IRQ handler if the status is non-zero. + + ret = devm_request_threaded_irq(&pdev->dev, irq, altr_i2c_isr_quick, + altr_i2c_isr, IRQF_ONESHOT, + pdev->name, idev); Thanks for the review and applying the patch!