Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2985720ybt; Sat, 4 Jul 2020 03:07:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDFUFBPOqLPIXVB22Cm41sg6Oaq68mjNPw7ZL1nw8740v3wHYo/Hy3eziUHHLQJrPAByTc X-Received: by 2002:aa7:d049:: with SMTP id n9mr38811895edo.39.1593857231838; Sat, 04 Jul 2020 03:07:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593857231; cv=none; d=google.com; s=arc-20160816; b=vr2D6LJ2gw78z2OvapYxE9giiEtJXR5ILhgS1eC/hIjAKtKTVkudTX9d3FpkkvnZkP iuis5vIyUhaksDsHL3EjkfAkRvONMVfXWTjtPcxRlT1QkM/HbeK+3gTxmV3Q1r6UvqdM 2ZyHyVTCAstsfjsqufhJZV2BJqJ9LoqQiibuLQzjWuhWGUCXHvXeue2W3gqLAAMxkZuG cFyuXxowUXi7Mn8vVfBPa9wq458ITDrDtvEPics4wumAUvuaaaHsFcQd5SlpmPbPsKlM PF9UmB+lPkPidOI13N0xI/jgfrC7M1/JDVP9h5197z2ygMmGzYvCvV+F12v0wwI9o2Zi +r7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=CA8jAzkc8W5El34ezuF44fIuAEbcJFUBVCL/rlG7C0M=; b=D/PZYwbwxuVUgEp3kwsR0XTo11Ifl/ksrBqUsF2N5V4RJ/Kvv6Edh4D0mCrPYMW8PD 7k87BXELiLiJF5jrbuZOMWUmtLYfeFzIfwPXHvKzroCC09WBCPJfDAe4uV8ue3jaBL/Z PzuJExG2y6lBneOqrOU4vOTIBwGRPGYzWLfmQvPmHsBkppAr6XLe3lxkdRRf2oiepdMf Fss3PTL4yrzvrpVdZpT/JSm8iJLF6KlN+prei5grC3THFC3BgPNm6abyPQ+gh/NbZJwR fttECH0uX+dWbxyfoFYA5TttERk4zWI/IL6tQbh/N3feYFrDxYFdqEAd0DHu0XEb9ymS kjeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FcLVCw4F; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b11si9552743ejg.42.2020.07.04.03.06.49; Sat, 04 Jul 2020 03:07:11 -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=@gmail.com header.s=20161025 header.b=FcLVCw4F; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726726AbgGDKGO (ORCPT + 99 others); Sat, 4 Jul 2020 06:06:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726178AbgGDKGO (ORCPT ); Sat, 4 Jul 2020 06:06:14 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2A02C061794; Sat, 4 Jul 2020 03:06:13 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id x8so12604770plm.10; Sat, 04 Jul 2020 03:06:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CA8jAzkc8W5El34ezuF44fIuAEbcJFUBVCL/rlG7C0M=; b=FcLVCw4FDMn8+9cPs40rfEdiHmHpyUrZ5rjyFIT/4NUjnkjjRRA5Z7AfESSDcdzVOb jwE5vkKOjCVfXlKplFBGLTB3G4eqMu4uNjNgiqZ+6AKifwOPVYyU+7orXvgv4QVmUd8n Je6AhuNHB9Mv8/oXIUato5MeYXJTtgnHXagOlUGLnkaoECk9yz/OqLk+IcXpebscE8R1 UE5Wr9FyE0x5/Pr5ysnx4ObDJW7EL1g/S2h4iTthKe9BYTKjXghPz/zMSh6LKlulWREb Rty1UgYzXvjN9M2Bo/cI78kH3RNdH8dSrlGY7V9DTlEE+IEs1l+SbHGTOSCo4pLJ2LCX sMzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CA8jAzkc8W5El34ezuF44fIuAEbcJFUBVCL/rlG7C0M=; b=SbEGJuf/lvkgAmpdVR8ygkhHk8C8Q48V5NeR5GarpAWJj91f0swYjO3p24US0Tmh5f e1B9btW/V9eBq6G+E6J9zh6fcfEuHgVVgmjHOpfktNTE7iRwq5KQ5wza7eUCQDA6YGbM WhKmteQGaD6ln8h3c0gF2HpkHt1SYvz39Dhxefy4KAD83F1f0cHYChVH/MkY5G4HFUc7 DcamRVEMznCkdsif0PlVn/r4Locd7RqcOXpQYs6lTvz6HEVL+B4PRf0bDqLcKFndoSgZ sLXXqSlVJbAj4zERGEAOzNZXT+6FSX/uOn4JDORA+GTZkGgXLam+DwmMOek1smcWN1GA aRrA== X-Gm-Message-State: AOAM530NWN4RFyJR/bUE/LArzP9W9NRqUXQnprT+1KF/oQAjoJ6XIPs9 zFTQRFyLvSZ1QFlq+miv93XCtLETUKKG9jAcp9g= X-Received: by 2002:a17:90b:3547:: with SMTP id lt7mr16435838pjb.181.1593857173428; Sat, 04 Jul 2020 03:06:13 -0700 (PDT) MIME-Version: 1.0 References: <20200702121722.1121468-1-mans0n@gorani.run> In-Reply-To: From: Andy Shevchenko Date: Sat, 4 Jul 2020 13:05:57 +0300 Message-ID: Subject: Re: [PATCH v4 1/2] gpio: add GPO driver for PCA9570 To: Sungbo Eo Cc: Linus Walleij , Bartosz Golaszewski , Michael Walle , Linux Kernel Mailing List , "open list:GPIO SUBSYSTEM" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 3, 2020 at 3:13 AM Sungbo Eo wrote: > On 2020-07-02 21:36, Andy Shevchenko wrote: > >> + gpio->chip.ngpio = i2c_match_id(pca9570_id_table, client)->driver_data; > > > > Oh, avoid direct access to the table like this. And you may simply use > > device_get_match_data(). > > I'm not sure if it really does the same thing, but I'll try following > your suggestion. It's an agnostic way to get it from fwnode enumerated devices. Since you are using ->probe_new() the driver should rely on fwnode, that's why the OF table has to have driver data be defined. -- With Best Regards, Andy Shevchenko