Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp759146rwr; Fri, 5 May 2023 04:48:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7mkUwWw8KGg2cPrIhVpgjXJx+lL+S2lwnj/+SzAN2Xij7PmJs5onzTfwT9a2lh31E16E/k X-Received: by 2002:a17:903:2289:b0:1a6:6d9f:2fc9 with SMTP id b9-20020a170903228900b001a66d9f2fc9mr1367612plh.30.1683287303211; Fri, 05 May 2023 04:48:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683287303; cv=none; d=google.com; s=arc-20160816; b=ILhC6lezziPtmnCTpO6uIriZtKFY4YGxnuZNqZFGpdfX6hPAjmMs21UgIt7BjJmKXf yTyiWkK6TIyxG0v0mmkDoebXbimnRl8YKwtzgDfALsRabBW6Jcqfv3PbbI0TloBIvzZP PrFwfGQmNt71PillLx91sL2RhBlondSsvH+PjAC+LjEbX8uSveU50v2/Tde0+IEGWVT6 B9S1Hws0HbalCm/MUQeR+9YfWdN5pNMuAvBiS+a3tqqFMuMHdMTnhffDiX11qIei0/60 Ks7fpFx6lqIt/nnjrPTaIKxndnHF5cz7at/S1J3i7zMtFOFyjB9cGBCg+2WrLQy2MIG6 jLUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:user-agent :references:in-reply-to:subject:cc:to:from:date:mime-version :dkim-signature; bh=ZBGaMOrsnlsgfMUN4JrTCITbu+aH8CMShQUm3tME11A=; b=MH8IsaWUWoMbywgD4qvub9v/rmeO7lka+4Poif78ENKLI2vEScbsChs3ziinxVoYDL xKd21YthmT4aMtDArZiadUBxTt5D21f8Nf8eOo7Eo26wu5EX19XxN5Er8Tb5a0XuwEo9 8Af1E/Q6Ej8O5BG1xol9ts9cGMrpAHoxveHT0kDSjxcXZDXx+xJpHLJuQ1ipM835Vsg/ l3swTPhOhzYEBSlPcXp/lmCKOFNP2GFNDh7ToxtL8UCF9rc0rq6NvUptZfYWJ4dbfhbc KwqO6tyt3CxMKT6gSlfW+EI1fB3j13jXosarueNVNwS5UhjHjCaC0UcY0sATgo1rnGzC 4nLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=xQA7IvTX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p15-20020a1709028a8f00b001a6555fb904si1424266plo.187.2023.05.05.04.48.08; Fri, 05 May 2023 04:48:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=xQA7IvTX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231563AbjEELb2 (ORCPT + 99 others); Fri, 5 May 2023 07:31:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229591AbjEELb0 (ORCPT ); Fri, 5 May 2023 07:31:26 -0400 Received: from mail.3ffe.de (0001.3ffe.de [IPv6:2a01:4f8:c0c:9d57::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADC707AB7; Fri, 5 May 2023 04:31:25 -0700 (PDT) Received: from 3ffe.de (0001.3ffe.de [IPv6:2a01:4f8:c0c:9d57::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id 875DC1262; Fri, 5 May 2023 13:31:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1683286282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZBGaMOrsnlsgfMUN4JrTCITbu+aH8CMShQUm3tME11A=; b=xQA7IvTXhk/s75gZLqCTsh781KYqUBaX6/0/qVy4eMtGtxEuvhm2Twv7maRel3nRMT1MAm JA1oXt8wZoC0F7fLsfl4kpQnjetd7n6dvMl9dVpPdOzRCntw5K7S9AD16tjsx+iHyeSa8C +5L4VicNP9imIb0d7jmzpBqSGfyPvlMLPk333vo/WJF9op+l2cHzXye08J7/oLhE8T8GJk HX7MC6wNQYw8OJ7He1cj2mtyPjr7PRUUqigvPP/8KWHtVjI+ah6wU5qa7/k23frQt0Y31I l5BMvFBM3BPkHBLlg4nOJZPqAEsLMWiq6tbwt8n6IEtDFnj5mXCFI+ZHvBzdoA== MIME-Version: 1.0 Date: Fri, 05 May 2023 13:31:21 +0200 From: Michael Walle To: Linus Walleij Cc: Esteban Blanc , lgirdwood@gmail.com, broonie@kernel.org, a.zummo@towertech.it, alexandre.belloni@bootlin.com, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-rtc@vger.kernel.org, jpanis@baylibre.com, jneanne@baylibre.com, aseketeli@baylibre.com, sterzik@ti.com, u-kumar1@ti.com Subject: Re: [PATCH v3 2/3] pinctrl: tps6594: add for TPS6594 PMIC In-Reply-To: References: <20230414101217.1342891-1-eblanc@baylibre.com> <20230414101217.1342891-3-eblanc@baylibre.com> User-Agent: Roundcube Webmail/1.4.13 Message-ID: <66a8224ffbeede1e8296a2aef60fc73d@walle.cc> X-Sender: michael@walle.cc Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, >> I noticed that I could override reg_mask_xlate, so I should be able to >> "just" match on the base address given as argument to perform a >> different computation depending on whether we are using reg_mask_xlate >> in >> a "direction change" or not, but somehow this feels a bit wrong. >> >> Is this the correct solution? >> Am I missing something? No you don't miss anything. This is the actual use case for the base parameter. If you need your own .xlate you can match on the base address to do the translation based on wether it is used for .direction, .set or .get. I.e. switch (base) { case REG_IO_CTRL: do_something_with_reg_and_mask; case REG_DAT: do_something_different_with_reg_and_mask; default: error; } -michael