From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966581AbcKOJW0 (ORCPT ); Tue, 15 Nov 2016 04:22:26 -0500 Received: from mail-qk0-f180.google.com ([209.85.220.180]:33963 "EHLO mail-qk0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941286AbcKOJWX (ORCPT ); Tue, 15 Nov 2016 04:22:23 -0500 MIME-Version: 1.0 In-Reply-To: <20161111095036.11803-4-wens@csie.org> References: <20161111095036.11803-1-wens@csie.org> <20161111095036.11803-4-wens@csie.org> From: Linus Walleij Date: Tue, 15 Nov 2016 10:22:22 +0100 Message-ID: Subject: Re: [PATCH v3 3/3] pinctrl: sunxi: Make sunxi_pconf_group_set use sunxi_pconf_reg helper To: Chen-Yu Tsai Cc: Maxime Ripard , "linux-gpio@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , linux-sunxi 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 Fri, Nov 11, 2016 at 10:50 AM, Chen-Yu Tsai wrote: > The sunxi_pconf_reg helper introduced in the last patch gives us the > chance to rework sunxi_pconf_group_set to have it match the structure > of sunxi_pconf_(group_)get and make it easier to understand. > > For each config to set, it: > > 1. checks if the parameter is supported. > 2. checks if the argument is within limits. > 3. converts argument to the register value. > 4. writes to the register with spinlock held. > > As a result the function now blocks unsupported config parameters, > instead of silently ignoring them. > > Signed-off-by: Chen-Yu Tsai > Acked-by: Maxime Ripard Patch applied. Yours, Linus Walleij