Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757187AbcJXGOD (ORCPT ); Mon, 24 Oct 2016 02:14:03 -0400 Received: from webbox1416.server-home.net ([77.236.96.61]:51570 "EHLO webbox1416.server-home.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757038AbcJXGOB (ORCPT ); Mon, 24 Oct 2016 02:14:01 -0400 From: Alexander Stein To: Linus Walleij Cc: Enric Balletbo i Serra , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-gpio@vger.kernel.org" , Rob Herring Subject: Re: [PATCH] gpio: mcp23s08: Add option to configure pullups. Date: Mon, 24 Oct 2016 08:13:54 +0200 Message-ID: <11644726.TmP4uu3h4l@ws-stein> User-Agent: KMail/4.14.10 (Linux/4.6.0-rc7+; KDE/4.14.24; x86_64; ; ) In-Reply-To: References: <1477062035-30825-1-git-send-email-enric.balletbo@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1064 Lines: 32 On Monday 24 October 2016 02:53:31, Linus Walleij wrote: > On Fri, Oct 21, 2016 at 5:00 PM, Enric Balletbo i Serra > > wrote: > > Default is without pullups, but if property is specified in DT and the bit > > is set, set a pullup on GPIO-n. > > > > Signed-off-by: Enric Balletbo i Serra > > I don't generally like this. > > In device tree it is the consumer that specifies how the line is used, > not the producer (gpiochip). > > We currently only specify polarity, open drain and open source > for consumers though. > > And the entire pin control system came into being *exactly* because > Grant didn't like me adding these things to the GPIO drivers. > > So how many other things does the MCP support? Drive strength? > Schmitt trigger? Is there a datasheet? Some unsupported features (AFAIK): * Input polarity (IPOL register) * open-drain interrupt pin * pullup on pins (proposed patch) Datasheet is here: http://ww1.microchip.com/downloads/en/DeviceDoc/21919e.pdf Best regards, Alexander