Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3698669ybt; Tue, 30 Jun 2020 09:12:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgXGUBTCOELPU/rOfhE9DVZsmrOAgCV++nJpdx00xo7mBGoEcmI4YuVEKdBsIFEFKIyct6 X-Received: by 2002:a50:e606:: with SMTP id y6mr23711426edm.303.1593533547423; Tue, 30 Jun 2020 09:12:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593533547; cv=none; d=google.com; s=arc-20160816; b=XJvuGn3Cs0HV5dvMSA52kF5vr5GBPz/vHFhG+nA0SanP2Dz9e0FACdwdUI7YMhKy+Z ohr6Thkgithbt5d+Zz1aCBuI5qG89RgCOOIO50DzQ/03dy7fuOaECCm3RBHwFXFCnJhC hKtT+Wigeh5lpH8V+KpQqXy74O9Rmcs0DefKji3IyA2r1w5/AEx6l1b1DY0XVJN450JI wkt2b9m+VWJ8+NK4j9I2NNKo6ohiveU7bQyL/zTH7F4JOUydCmWphtrC59KzZsGPgz2/ TODxHmRZnY3p/1k3F9iRHj3DKcZ+gik8KgyCrerB3Jv9b82qJt0RGBb08R+9ejBxMZ04 zCSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:date:message-id:from :references:cc:to:subject:dkim-signature; bh=WvyEvwVOE6KFGw0IR8ROR1P235uwh5VDXyfvL1XeXgA=; b=drtVThFhhISRkTwRzqk2HQAVoQqBdM9MBa6fv9u/InNtzQxBiHyJ6KPWP3cNusAJCH cvSfNMXUC7IaW5IAWzyJT+75ZLBFKOhkQYqpKhpuf+KD0REaes11UZhZSBrnGWX7W6dA uhtc8VSKXC0rIeZnMt5fasE0hOD+2TrPMs4/cRidYaWGbkHI7n8LmjWzAIWyVf3Ddlkx K7ILeZ+nLoiRZnbV3IqyUsDXEloaSrBe/iO8LPt5LjG7DXlrSLKonGXEDuqTSs5hXC8E tXQLcd5vFG2EPzNxRePsU+qVP8hJYubWx1Figt4T+IebftD+lUTgYBMElnzcmdjJ9NSj KgOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gorani.run header.s=MBO0001 header.b=j73ErYfM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gorani.run Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z3si1996876eja.429.2020.06.30.09.12.04; Tue, 30 Jun 2020 09:12:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gorani.run header.s=MBO0001 header.b=j73ErYfM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gorani.run Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729647AbgF3QL2 (ORCPT + 99 others); Tue, 30 Jun 2020 12:11:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726117AbgF3QL1 (ORCPT ); Tue, 30 Jun 2020 12:11:27 -0400 Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [IPv6:2001:67c:2050::465:201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C374C061755; Tue, 30 Jun 2020 09:11:27 -0700 (PDT) Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 49x8Vj546PzQlLc; Tue, 30 Jun 2020 18:11:25 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gorani.run; s=MBO0001; t=1593533483; 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=WvyEvwVOE6KFGw0IR8ROR1P235uwh5VDXyfvL1XeXgA=; b=j73ErYfMWm6xpXPOypH1e0O4BeBvU/7X9mMqNt5Fubpqo0+PCONMb9KncbqekxtX/KxsAI rRdgPTYv98ApEr+JHhC1zMsZyMwkHJELP2L97BCJ6ypolHE93O8ajAus4ZdOhN3owbFieu qYUhmXIo2VU/JGBbIzQrGAWYQ0g3X2fKpxtkOCX11Da0Y7fZwDbCJKtTYz79vGuG4MpFEX jdPeIkm3+rU/KFoATWeODmhE3Y1FBjxpfSaWHJ0tRabrrp/7U+poAC944c+vcOGbfsVWAw S0WNDqoTa+osV9iYeyNlS8cYXGfp+8bYpU2Jy/8WB5caAO3661zgVB7bB4DbZw== Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id GE1n9uaG34HV; Tue, 30 Jun 2020 18:11:22 +0200 (CEST) Subject: Re: [PATCH v2 1/2] gpio: add GPO driver for PCA9570 To: Andy Shevchenko , Bartosz Golaszewski Cc: Linus Walleij , LKML , linux-gpio References: <20200625075805.363918-1-mans0n@gorani.run> From: Sungbo Eo Message-ID: Date: Wed, 1 Jul 2020 01:11:16 +0900 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-MBO-SPAM-Probability: 0 X-Rspamd-Score: -4.04 / 15.00 / 15.00 X-Rspamd-Queue-Id: A955F1800 X-Rspamd-UID: ed3a9e Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for all the reviews! I've updated the patch, please have a look. And I have something to ask. # echo 1 > gpio408/value # cat gpio408/value cat: read error: I/O error # cat gpio408/direction out # echo out > gpio408/direction # echo in > gpio408/direction [ 91.006691] gpio-408 (sysfs): gpiod_direction_input: missing get() but have direction_input() ash: write error: I/O error I've never dealt with GPO expander before, so this seems a bit odd to me. Is it perfectly okay to leave get() and direction_input() unimplemented? Thanks. On 2020-06-30 18:53, Andy Shevchenko wrote: > On Tue, Jun 30, 2020 at 12:28 PM Bartosz Golaszewski > wrote: >> On Thu, Jun 25, 2020 at 9:58 AM Sungbo Eo wrote: > >>> +static const struct of_device_id pca9570_of_match_table[] = { >>> + { .compatible = "nxp,pca9570" }, >>> + { /* sentinel */ } >>> +}; >>> +MODULE_DEVICE_TABLE(of, pca9570_of_match_table); >> >> If you're not using it in probe than maybe move it next to the I2C device table? > > (Side note) > ...and even if so it can be assessed via a struct device pointer: > dev->driver->id_table (don't remember by heart, but you have an idea). >