Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934397AbbKSOS0 (ORCPT ); Thu, 19 Nov 2015 09:18:26 -0500 Received: from vps0.lunn.ch ([178.209.37.122]:37268 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934177AbbKSOSY (ORCPT ); Thu, 19 Nov 2015 09:18:24 -0500 Date: Thu, 19 Nov 2015 15:18:10 +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: <20151119141810.GA30828@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <564D66BF.5010601@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: 1122 Lines: 33 > > #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? > > static const struct of_device_id eeprom_93xx46_of_table[] = { > > { .compatible = "eeprom-93xx46", }, > > { .compatible = "atmel,at93c46d", .data = &atmel_at93c46d_data, }, > > @@ -385,6 +402,15 @@ static int eeprom_93xx46_probe_dt(struct spi_device *spi) > > if (of_property_read_bool(np, "read-only")) > > pd->flags |= EE_READONLY; > > > > + ret = of_get_named_gpio(np, "select-gpios", 0); > > gpios or gpio? I see only one requested gpio. DT always uses the plural. Go read some bindins in Documentation/devicetree/bindings/ 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/