Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4061749ybc; Thu, 14 Nov 2019 20:52:19 -0800 (PST) X-Google-Smtp-Source: APXvYqxPGa3zPilnd5cWMa2PpEfUoDVPHqcA13h3AsHwoffmRsxmA4cNz9witn1AEbxgD7JkiPkm X-Received: by 2002:a17:906:f259:: with SMTP id gy25mr10566941ejb.297.1573793539667; Thu, 14 Nov 2019 20:52:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573793539; cv=none; d=google.com; s=arc-20160816; b=ck4u2+gvLuJe3HLKKbudgVTpqNLFQM1Ivfh76QcQBfU9UrpWmurBMI6k8smJY8k3sL WP44CpbTwgR9fIItsM84VUaUoVkwIT1hGwB958zrMKCISabYQEjDXjbiw4ebR+WMZ/z1 ow4aYooBIO1qfr2g+K5cdPVxDMYVIlnfzkqn1ujosnh6fe02C84pWELaALGC+KGLXix7 Rc7J9Igrmvaul9ybCP1j22k9/cqR4OaLzZ0B0anh1lDx7xtHQW5ooHm9nF/0vSFYX+UL tcD1FWCfKHEIJ6Oj8z9KLgOsNQqd4TrE8KH17KMi+1FbKpX502CDiT7UTbEkyIBRhREh 9Mrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:mime-version :message-id:date:dkim-signature; bh=w71CA9nI41QLngUUjO4kaDNCWv8Is/cxYLfXviB89PM=; b=nlp3+u6ou9h6d6kHvncTPCDy45tPKrIg6ng7En3WJoWYWCETpJWRTFyYoqFkHiRRg0 coIAyqFWOi2L468EwpfAxhFcjRkqB4KFA/F4gMU4jCxwCK6HwkeJj1lavgmxXD1PFWrC YSEZvpwoaZaY9CgL92yPlDHVhNswM8ieS7qeh9o5cscm9eQj2i4i1r7llk2y2I2SS+Fb F8BWpVOFRXsc1zT+DMrhdz3vmKgHYcH8bzodo2pPZrbPcyS4QgB4JbhieqnDoVAczurZ NjC0UvpLnOD1EtHZIsyBKQzYzHpTavO8PDkbSsoUIsjEdBmpEQbiAnulzgjEEzr0tzaV XV9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=NTo8ybxo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c44si5430367ede.398.2019.11.14.20.51.54; Thu, 14 Nov 2019 20:52:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=NTo8ybxo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727119AbfKOEu6 (ORCPT + 99 others); Thu, 14 Nov 2019 23:50:58 -0500 Received: from mail-pl1-f202.google.com ([209.85.214.202]:34659 "EHLO mail-pl1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726755AbfKOEu6 (ORCPT ); Thu, 14 Nov 2019 23:50:58 -0500 Received: by mail-pl1-f202.google.com with SMTP id u9so5527752plq.1 for ; Thu, 14 Nov 2019 20:50:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=w71CA9nI41QLngUUjO4kaDNCWv8Is/cxYLfXviB89PM=; b=NTo8ybxoixlCH0ZM1hpm8k1kL45i3+Eh5sJUx6aF70GQFnFicUSLH/iVN4V7v5nxez aSeLn+YhSHtNCWALSPcXKt1kt9rXZTysNWTysx9jJCcdsfzPAZHfZ3lVgIJDVQOh/kk8 U6L8AqrRcEQR/8bltVArD3ZU0+dZmE4FYWigJYdNlpP3DSOGwSn1zsz2krBosITPAmTs DJitrC4FkVwD/IOkaerJR5ymcO2HxxN9VZZ0CH7/ALoVmiIlZr+IV0BPY5WaPBS6c/Da Pojk/sakGMiZms6D9fYDH8aveluLe5NxC43OLQeYNe0ds5yXHzA3H1OTuiFV2I05mNtL Q3tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=w71CA9nI41QLngUUjO4kaDNCWv8Is/cxYLfXviB89PM=; b=KiOqaZB6wqsFnF7RvwK9iAZkKoEz4yYwkjXG2/WqgDQu8WGRTQZ3oKzD6O3Nj5EzlK e+32oZw871L/Xb7KNo6iH363DVQ/TPHwcPpj2zzCXE77mYF5vKwEYq1E/NIijidN3B+8 KUVm/JQCYQ9m3dLGrg07sQ3CdqPq3WVkdtPfJ5x80MOZBf1IgqH1d6F6O3JaLAbA/Xmk u6TkiBjgBMxJNgBaxis8ZCZOSzkhRtpn6ZIrvmGsZnrxhmnbpwY/oMiFY+3wq/hXcXSn fu4mmaZJvhb+c2LaauY81fov+gRNrjPeis+pyvvSWisUCPDPlefCupJV39Hs648O7W/F rWug== X-Gm-Message-State: APjAAAXHz+v9iqFJ9M1mNgrUICcXtB7Mtfqmgqc0I5N8Yi/fL43DM755 jYFaI1TYzXuf9SA4dTFmOVfoUunFroJLQfI= X-Received: by 2002:a63:ee44:: with SMTP id n4mr1499531pgk.137.1573793455780; Thu, 14 Nov 2019 20:50:55 -0800 (PST) Date: Thu, 14 Nov 2019 20:50:48 -0800 Message-Id: <20191115045049.261104-1-saravanak@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.24.0.432.g9d3f5f5b63-goog Subject: [PATCH v1] i2c: of: Populate fwnode in of_i2c_get_board_info() From: Saravana Kannan To: Wolfram Sang Cc: Saravana Kannan , Greg Kroah-Hartman , kernel-team@android.com, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org 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 This allows the of_devlink feature to work across i2c devices too. This avoid unnecessary probe deferrals of i2c devices, defers consumers of i2c devices till the i2c devices probe, and allows i2c drivers to implement sync_state() callbacks. Cc: Greg Kroah-Hartman Signed-off-by: Saravana Kannan --- The of_devlink feature is present in driver-core-next branch. It started off with [1] but it has been improving since then. [1] -- https://lore.kernel.org/linux-acpi/20190904211126.47518-1-saravanak@google.com/ drivers/i2c/i2c-core-of.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/i2c/i2c-core-of.c b/drivers/i2c/i2c-core-of.c index 6f632d543fcc..4e913c890a7b 100644 --- a/drivers/i2c/i2c-core-of.c +++ b/drivers/i2c/i2c-core-of.c @@ -50,6 +50,7 @@ int of_i2c_get_board_info(struct device *dev, struct device_node *node, info->addr = addr; info->of_node = node; + info->fwnode = of_fwnode_handle(node); if (of_property_read_bool(node, "host-notify")) info->flags |= I2C_CLIENT_HOST_NOTIFY; -- 2.24.0.432.g9d3f5f5b63-goog