From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f44.google.com ([209.85.218.44]:32882 "EHLO mail-oi0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755253AbcCVItz (ORCPT ); Tue, 22 Mar 2016 04:49:55 -0400 Received: by mail-oi0-f44.google.com with SMTP id d205so165395936oia.0 for ; Tue, 22 Mar 2016 01:49:55 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <56EFFBB6.40806@analog.com> References: <1457009883-4017-1-git-send-email-michael.hennerich@analog.com> <56DAEDF4.6040008@kernel.org> <56DD7548.8050306@analog.com> <56EFFBB6.40806@analog.com> Date: Tue, 22 Mar 2016 09:49:55 +0100 Message-ID: Subject: Re: [PATCH v3] iio: dac: Add support for the AD5592R/AD5593R ADCs/DACs From: Linus Walleij To: Michael Hennerich Cc: Jonathan Cameron , Alexandre Courbot , Lars-Peter Clausen , Hartmut Knaack , Paul Cercueil , Rob Herring , =?UTF-8?Q?Pawe=C5=82_Moll?= , Mark Rutland , "ijc+devicetree@hellion.org.uk" , "linux-iio@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-gpio@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-iio-owner@vger.kernel.org List-Id: linux-iio@vger.kernel.org On Mon, Mar 21, 2016 at 2:48 PM, Michael Hennerich wrote: > The thing is that the device directly supports an OPEN DRAIN mode. > > If the consumer asks for open drain mode - everything works as expected. > However instead of utilizing the on-chip feature, GPIOLIB will emulate open > drain behaviour by configuring the chip for input when someone writes logic > high. > > So the comment above was really meant to say - > remove on-chip OPEN DRAIN mode, consumers should use the GPIOLIB > implementation if required. This is very interesting. So if a hardware has *real* open drain, i.e. a bit in hardware that says "set me in open drain mode" we should manage this in gpiolib and provide a special callback in the vtable for it, right? Because it is certainly better to do this with hardware, if we can. I'll send a draft patch and we can see if this is what you want. Yours, Linus Walleij