From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751740AbdATIu4 (ORCPT ); Fri, 20 Jan 2017 03:50:56 -0500 Received: from mail-io0-f170.google.com ([209.85.223.170]:36125 "EHLO mail-io0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751513AbdATIuy (ORCPT ); Fri, 20 Jan 2017 03:50:54 -0500 MIME-Version: 1.0 In-Reply-To: <20170119094820.83595-2-mika.westerberg@linux.intel.com> References: <20170119094820.83595-1-mika.westerberg@linux.intel.com> <20170119094820.83595-2-mika.westerberg@linux.intel.com> From: Linus Walleij Date: Fri, 20 Jan 2017 09:43:07 +0100 Message-ID: Subject: Re: [PATCH 1/3] pinctrl: Widen the generic pinconf argument from 16 to 24 bits To: Mika Westerberg Cc: Alexandre Courbot , Andy Shevchenko , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 19, 2017 at 10:48 AM, Mika Westerberg wrote: > The current pinconf packed format allows only 16-bit argument limiting > the maximum value 65535. For most types this is enough. However, > debounce time can be in range of hundreths of milliseconds in case of > mechanical switches so we cannot represent the worst case using the > current format. > > In order to support larger values change the packed format so that the > lower 8 bits are used as type which leaves 24 bits for the argument. > This allows representing values up to 16777215 and debounce times up to > 16 seconds. > > We also convert the existing users to use 32-bit integer when extracting > argument from the packed configuration value. > > Signed-off-by: Mika Westerberg I like the looks of this :) Look into Andy's comment and whatever else appears, then let's apply the v2 of this. Yours, Linus Walleij