Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758819AbbKSRP4 (ORCPT ); Thu, 19 Nov 2015 12:15:56 -0500 Received: from vps0.lunn.ch ([178.209.37.122]:37451 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755918AbbKSRPz (ORCPT ); Thu, 19 Nov 2015 12:15:55 -0500 Date: Thu, 19 Nov 2015 18:15:45 +0100 From: Andrew Lunn To: Vladimir Zapolskiy Cc: Cory Tusar , robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, agust@denx.de, gregkh@linuxfoundation.org, jic23@kernel.org, broonie@kernel.org, afd@ti.com, Chris.Healy@zii.aero, Keith.Vennel@zii.aero, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 5/5] misc: eeprom_93xx46: Add support for a GPIO 'select' line. Message-ID: <20151119171545.GF25345@lunn.ch> References: <1447903781-3910-1-git-send-email-cory.tusar@pid1solutions.com> <1447903781-3910-6-git-send-email-cory.tusar@pid1solutions.com> <564D66BF.5010601@mleia.com> <20151119141810.GA30828@lunn.ch> <564DFE69.6000203@mleia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <564DFE69.6000203@mleia.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 905 Lines: 28 On Thu, Nov 19, 2015 at 06:52:57PM +0200, Vladimir Zapolskiy wrote: > On 19.11.2015 16:18, Andrew Lunn wrote: > >>> #ifdef CONFIG_OF > >>> +static void select_assert(void *context) > >>> +{ > >>> + struct eeprom_93xx46_dev *edev = context; > >>> + > >>> + gpiod_set_value_cansleep(gpio_to_desc(edev->pdata->select_gpio), 1); > >> > >> I would suggest to use gpio_set_value() > > > > Could you explain why? > > > > Maybe this gpio is on an SPI GPIO expander? > > My point is that gpio_*() interface, gpio_set_value() or > gpio_set_value_cansleep(), might be preferred is this particular case. Ah, O.K, yes, avoid the gpio_to_desc() call. Agreed. Andrew -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/