Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4092367rwd; Mon, 29 May 2023 23:47:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4uyQ7YJobfMcbPv+l3Iilp4C8uThgNd2Gz97Cn0bRqF17dha3TXJl8v1D1tvzLhiVsURZt X-Received: by 2002:a05:6a20:3c8f:b0:10c:a627:7ede with SMTP id b15-20020a056a203c8f00b0010ca6277edemr1550376pzj.58.1685429275625; Mon, 29 May 2023 23:47:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685429275; cv=none; d=google.com; s=arc-20160816; b=je2cSUEypyzUloBqYL6IZuhfDqnSh3iJMH7lbX7EsbNI9eIOxcTSoAIDnr6LaXQgMp V/RPU0NoEB9Mrt4ZytWVT7xTA7o1jEVQyr+pIuyoh3Dz1b5AlzdoQh7dcYjv9ftbucah bKkrSjqOsnR29Pmsu7anxb43iz+QlqMUrKy3niFCHpGz2FQhXlVriBFCY7zkfSWx1F2i 29j2b93zXsEXm9qMhMWq85AJyknf1BdQvJxj/TFuE96OXi6qbsUXl24+6p0eugbMCpAp yaiFxSZcYQJCIL4xDRTXFa0Y5nsTuOQ28PzrT1/kCCev5IkRxaMtgwhb7ztk+YvUO0D6 n2eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=b7rmr1U6NpOP1rc+VsCmDNiHKzP9/EyA9LTy90O+r9w=; b=avi7OdH0l+mm1cbOop+FI5Qo6Fzt0nv404nrwgOTIgcApS5DEyscU3W5/hS8Pa1SDh zyQNqqe6XYGuYcDGwtJc5bPpRB84CwWRC0RRnFIRmeWN8uMTrS77OYX4EB8h4iNB+BXN 2j25zE+tRV+GOYWoZiTkfxx0Oy7kmucOdS75psW1ro6l4QVZ5Y2hWfyTILtzUkjY4fCW OuRdAuNRbSCUo3BUvCRS431XuhumV/xZdkoibQ9VaPbfbpBOQYirTKnnfUbdaTW5IirR i+j7C9gTYv/JwifbMLdPzrworuL7uRQigff3jDDjKVLNNu24OYHYh8SlQxnxBJQzw1Oc RA5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=l0nWpOUU; 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=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f2-20020a633802000000b005034a5a0a58si6625782pga.434.2023.05.29.23.47.41; Mon, 29 May 2023 23:47:55 -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=@163.com header.s=s110527 header.b=l0nWpOUU; 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=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229838AbjE3G1y (ORCPT + 99 others); Tue, 30 May 2023 02:27:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjE3G1x (ORCPT ); Tue, 30 May 2023 02:27:53 -0400 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.214]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3FD3DDC; Mon, 29 May 2023 23:27:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Message-ID:Date:MIME-Version:Subject:From: Content-Type; bh=b7rmr1U6NpOP1rc+VsCmDNiHKzP9/EyA9LTy90O+r9w=; b=l0nWpOUULxiYEK3NQkUQn4EL6e8tYHjOqojhWxpc91PZbplcGzSq/EwSKxzOPX yomRrGSZnPziXmY3gavCJx2D3025DxwVFCNCz6xVurv0VregC364c0pHKJ6Gxb/Z YGGaHmpMQa8725fixutlyJKt4kVe/4lq13vyxC3CJl158= Received: from [172.20.10.4] (unknown [39.144.137.62]) by zwqz-smtp-mta-g2-4 (Coremail) with SMTP id _____wCHRKI9l3VkwIjVAw--.26122S3; Tue, 30 May 2023 14:27:11 +0800 (CST) Message-ID: <5428dcc3-bcaf-2fff-59db-62d3b3b45d17@163.com> Date: Tue, 30 May 2023 14:27:09 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v2 1/1] gpio-f7188x: fix base values conflicts with other gpio pins Content-Language: en-US To: andy.shevchenko@gmail.com, simon.guinot@sequanux.org Cc: Linus Walleij , brgl@bgdev.pl, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, henning.schild@siemens.com, xingtong.wu@siemens.com References: <20230529025011.2806-1-xingtong_wu@163.com> <20230529025011.2806-2-xingtong_wu@163.com> From: "xingtong.wu" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-CM-TRANSID: _____wCHRKI9l3VkwIjVAw--.26122S3 X-Coremail-Antispam: 1Uf129KBjvJXoW7uryUWF43Kw4DGFyxur48WFg_yoW8CF17pF W7CF42yF4kt3Z3Krn2kF4jvFyYvFZrtFs8WF1Fkr4UZry5ua48Xr4I9w45uFy3Xw4fGw4a yF4qg347G3ZrZaDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jlfOrUUUUU= X-Originating-IP: [39.144.137.62] X-CM-SenderInfo: p0lqw35rqjs4rx6rljoofrz/1tbiOwJ-0GC5lvAeEAAAsn X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 On 2023/5/30 06:24, andy.shevchenko@gmail.com wrote: > Mon, May 29, 2023 at 03:54:36PM +0200, simon.guinot@sequanux.org kirjoitti: >> On Mon, May 29, 2023 at 03:03:28PM +0200, Linus Walleij wrote: >>> On Mon, May 29, 2023 at 2:27 PM wrote: >>> >>>> It would be nice if a pin number found in the device datasheet could >>>> still be converted into a Linux GPIO number by adding the base of the >>>> first bank. >>> >>> We actively discourage this kind of mapping because of reasons stated >>> in drivers/gpio/TODO: we want dynamic number allocation to be the >>> norm. >> >> Sure but it would be nice to have a dynamic base applied to a controller >> (and not to each chip of this controller), and to respect the interval >> between the chips (as stated in the controllers datasheets). > > What you want is against the architecture. To fix this, you might change > the architecture of the driver to have one chip for the controller, but > it's quite questionable change. Also how can you guarantee ordering of > the enumeration? You probably need to *disable* SMP on the boot time. > This will still be fragile as long as GPIO chip can be unbound at run > time. Order can be changed. > > So, the patch is good and the correct way to go. > > P.S. The root cause is that hardware engineers and documentation writers > do not consider their hardware in the multi-tasking, multi-user general > purpose operating system, such as Linux. I believe the ideal fix is to fix the > documentation (datasheet). > Hi, Thanks for your review. The direct reason of this patch is that when "modprobe gpio-f7188x", it conflicts with INT34C6. I met this issue on an older kernel, but could not remember which version exactly. The error message is as the link below: https://elixir.bootlin.com/linux/v6.3.2/source/drivers/gpio/gpiolib.c#L798 - XingTong Wu