From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C37BBCCA479 for ; Wed, 13 Jul 2022 14:57:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231653AbiGMO5i (ORCPT ); Wed, 13 Jul 2022 10:57:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230060AbiGMO5g (ORCPT ); Wed, 13 Jul 2022 10:57:36 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A76593DF29 for ; Wed, 13 Jul 2022 07:57:34 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id y11so12970503lfs.6 for ; Wed, 13 Jul 2022 07:57:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=jsje3ehsR9ECEkj9DfwB4VaXb0L+a8MycN172EG5eN0=; b=yvLyC+97xwgjQCTxuOGpEGThaXKimbQEVNC3zZgRfJD7waj7OsQW4SD9tUL+KukEp4 H9Be1+kNouZZEaM1WPmgQlSQlH78KfEDAjelvzKr3bLJ+cOBBccHVJibqu6yPw6irowR /OlBiFNiU0Tg1q3mlL39JvDD8ESfRM2QRB4gfzVCaUS2e3V5MYVFbpfTei7YnvqVTha0 ux3Gzwj673tn7l7ci1bOi9LIR7zl0vmzXO77Py364nzIGMRV4nqfYgRgOEo3ADxLi56Z YUTZ4DAKqMHyCSMflv1sF8hZ2SW9AzbTohAAUj5PcrpMUofnoRuFffBhmw8JMM/iQoed a6pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=jsje3ehsR9ECEkj9DfwB4VaXb0L+a8MycN172EG5eN0=; b=WZVMgxe3POuuFNuC1I+7mXo89mmiN+UfBfyDb28Zb3ppBQAPP3vj2D5f4kQtmm3Mq8 0rsD8z4DTit3X53Tfw+Zj95kqJbg01jz02WdBaa2dIRLAV+Wa9P/BjesxzL5fAMyAqVZ n4ngA+DgNFUanZ6WlvX5oUm62zTIuFKLzMfkXzMOjJqP9ziF5ZtWi+8MuaomK22BxI2l 7c6RsIYZx+EEjpmv3wienxRWCVvmYTbY+tLRte0kcsbMxlVmMh/NiJaCFw5BOZR3iJ6h RAF5LZJeoP0QRLHANludGFkcplLABQ2eqBn2fM7VTw9ogST2WVTY2UwIn0Pzm1QmLohl hZ6Q== X-Gm-Message-State: AJIora/FF6m7hQTOyN0J4CQga5ILgd0XpDGKbnRNe2XLhaT11YP/URRB 5Rik99BOhsvNbGd3qcO3oySIwQ== X-Google-Smtp-Source: AGRyM1vgRrhj/XY2koHbYAelGs303XVEdbTp0skZTLYnMp+cYfZfwoA4a64JTuw4BRIVm4/zK2SH5Q== X-Received: by 2002:a05:6512:1091:b0:489:7a4b:c46e with SMTP id j17-20020a056512109100b004897a4bc46emr2241003lfg.151.1657724252969; Wed, 13 Jul 2022 07:57:32 -0700 (PDT) Received: from [10.0.0.8] (fwa5da9-171.bb.online.no. [88.93.169.171]) by smtp.gmail.com with ESMTPSA id x26-20020a19f61a000000b0047f963bf815sm2842009lfe.93.2022.07.13.07.57.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Jul 2022 07:57:32 -0700 (PDT) Message-ID: <2a43d0a3-cb6e-460c-d17f-abb81de40422@linaro.org> Date: Wed, 13 Jul 2022 16:57:29 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v1 2/2] pinctrl: nuvoton: add NPCM8XX pinctrl and GPIO driver Content-Language: en-US To: Tomer Maimon Cc: Avi Fishman , Tali Perry , Joel Stanley , Patrick Venture , Nancy Yuen , Benjamin Fair , Linus Walleij , Rob Herring , Krzysztof Kozlowski , =?UTF-8?Q?Jonathan_Neusch=c3=a4fer?= , zhengbin13@huawei.com, OpenBMC Maillist , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , devicetree References: <20220710102110.39748-1-tmaimon77@gmail.com> <20220710102110.39748-3-tmaimon77@gmail.com> <95d12b72-be9d-5503-c4ea-801303bb7776@linaro.org> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On 13/07/2022 16:51, Tomer Maimon wrote: > On Wed, 13 Jul 2022 at 17:29, Krzysztof Kozlowski > wrote: >> >> On 13/07/2022 15:35, Tomer Maimon wrote: >> >>>>> +static int npcm8xx_pinctrl_probe(struct platform_device *pdev) >>>>> +{ >>>>> + struct npcm8xx_pinctrl *pctrl; >>>>> + int ret; >>>>> + >>>>> + pctrl = devm_kzalloc(&pdev->dev, sizeof(*pctrl), GFP_KERNEL); >>>>> + if (!pctrl) >>>>> + return -ENOMEM; >>>>> + >>>>> + pctrl->dev = &pdev->dev; >>>>> + dev_set_drvdata(&pdev->dev, pctrl); >>>>> + >>>>> + pctrl->gcr_regmap = >>>>> + syscon_regmap_lookup_by_compatible("nuvoton,npcm845-gcr"); >>>> >>>> No. Use property. By this patchset, I would expect that you learnt from >>>> previous mistakes around this. Why repeating the same trouble second time? >>> You suggest to use phandle property like nuvoton,sysgcr even that the >>> NPCM8XX pin controller driver is used only NPCM8XX SoC, so the only >>> GCR node in the NPCM8XX SoC is nuvoton,npcm845-gcr? >> >> Yes. The previous case (reset driver, AFAIR) was also about driver used >> only in one SoC, wasn't it? > Actually not, the NPCM reset driver serves NPCM7XX and NPCM8XX and > probably other future BMC SoC's No, when someone developed reset driver, it served only NPCM7XX. So using this argument - only one SoC is supported - that person use exactly the same API as here. And it was wrong... Now you use the same argument - only one SoC is supported. I clearly see a pattern here... > Still, you suggest using the phandle property in the driver even if > the driver serves one SoC? >> >> Best regards, >> Krzysztof > > Best regards, > > Tomer Best regards, Krzysztof