From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lars-Peter Clausen Subject: Re: [PATCH v4 4/4] iio: humidity: si7020: added No Hold read mode Date: Wed, 28 Oct 2015 10:38:05 +0100 Message-ID: <5630977D.2020102@metafoo.de> References: <1446015506-21371-1-git-send-email-nicola@corna.info> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1446015506-21371-1-git-send-email-nicola-V0pQiMyom5mh6J55Ss3d3w@public.gmane.org> Sender: linux-iio-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Nicola Corna , Wolfram Sang , Stephen Warren , Lee Jones , Eric Anholt , Jonathan Cameron Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Hartmut Knaack , Peter Meerwald , linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-i2c@vger.kernel.org On 10/28/2015 07:58 AM, Nicola Corna wrote: [...] > + holdmode = !((*client)->adapter->quirks && > + (*client)->adapter->quirks->flags & [...] > + client->adapter->quirks && > + client->adapter->quirks->flags & I2C_AQ_NO_CLK_STRETCH) This is rather ugly, can we get a helper in the I2C core something along the lines of i2c_check_quirks(client->adapter, I2C_AQ_NO_CLK_STRETCH) - Lars