Received: by 2002:a05:6358:795:b0:dc:4c66:fc3e with SMTP id n21csp2085928rwj; Sun, 30 Oct 2022 11:01:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6H/sSJoyfBHW/e8q7yJzQaI5WSZX81T6zrg36FAcC0prPCOHfAOUqQ7MNUWbfqfKiC3N9I X-Received: by 2002:a17:907:88ca:b0:7ad:b635:2f1c with SMTP id rq10-20020a17090788ca00b007adb6352f1cmr6971457ejc.6.1667152887024; Sun, 30 Oct 2022 11:01:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667152887; cv=none; d=google.com; s=arc-20160816; b=pX8RnAhnbk9TX4+PYPcjEhqbT98xFojtRWXs8ioS8mYomffPMublxu2UYGgDxijY3M 0Yt1VxDOYd/Hr3evPUP0h9iY6NchC6XSoxeP+4h5nkzeS6Qme1n8Kn9b/BVqAzd5GBTM hLXtwqxPGyWZjj1rd014gPYq/kdHAeeYI7xGvx/r/idz8OsTd9qF+9plVmsrqSbd604e uBCde6Mh1+ZvkrTDGlJJSCNou5SZEj2jGzdfegzm0ezFsK4IzznnrFKio7MQqjN+JEwe fal6qDy/UQns32pO1IB15e4BUfx68jTvqkPBowAOyqfcKu+SUOl6jsvOjJ4CLIuK0aFF j0GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=iRGQwiJyyZtZTz3TByj9KEqkFvLoG13HbwyG6xbLJsA=; b=ElddZezHeUV0oyvYz8mlKpeG2Zz3HdZp5Y4hHeJ+UiDtFil1nrhTbzXGMw617bQ1gG jIgTNNqYXEJfCv6rIKWDcrMxAT4lUd4+bG3NxN5oP45eaNpBBGpI5R6HexWjqEdPG50X tCA763V1ZjZ5YUin6MamzMDvVsNx098VzFp6rKbYwv1omRy8FpSDRwuvNwYDYr2TlVcB T8JuNDXBVIgIEkdcwLSDkMicbM1/Cz8uKEYvsJlW+D0B4UPf/cbmEqffhnRtvy4DQDzw KheTv+XN2bpc1y6uuyyzGg34cHxQaoZGi7NJoogQoduOpS9MPzyDaDFBCI/V73Wn/uNW TdYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FAckUJwd; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bt19-20020a0564020a5300b0045c42a9f588si4380726edb.408.2022.10.30.11.01.01; Sun, 30 Oct 2022 11:01:26 -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=@gmail.com header.s=20210112 header.b=FAckUJwd; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229619AbiJ3RwP (ORCPT + 99 others); Sun, 30 Oct 2022 13:52:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229531AbiJ3RwO (ORCPT ); Sun, 30 Oct 2022 13:52:14 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E483C14; Sun, 30 Oct 2022 10:52:12 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id h9so13132971wrt.0; Sun, 30 Oct 2022 10:52:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=iRGQwiJyyZtZTz3TByj9KEqkFvLoG13HbwyG6xbLJsA=; b=FAckUJwd6EZu55q7Mb7vIO0E3XAFW3dHy41sLo7QgJxjCpa26PyWWGGAMN/XFJpbQd 59Np4n5e/+Loxc9ipdU4d2YPhh1U78AhhqNjeG7W8p43DsGTnVtFhwW0Hl3CVfmkkWaU lApgSmjrooGqN/MavVzATDssXOtnoiiu2/7OalPsQzgJ9QV+RVUrqBJ0xAKYg3EldGPF lmfA4TnGFSlbcgwfGqHw4SL2+wJllxXz90zxMhbRQzJkm/UW5pZK3InndwZF2C0TJHsg CwCXwlMV/LEOJn0RtXBzlzevVxU0Etq06wr5ihtsbFlzeGyza6Nht3WE/6OxSE85cJEX XkHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=iRGQwiJyyZtZTz3TByj9KEqkFvLoG13HbwyG6xbLJsA=; b=VnROlqCvwH4lcCTwnyS28dvAano9ThlIwk4+u/tUVskX7LNwkJY/RQsA1SfQYMwFYp y8R+mhB92a/vrtrMHxHywVCSgfvnDxFs6AO15NaBoGU8go/mJ5pGT/bTVYFwl8GvPwJs PvY0iNpfm/8ETOUN+6GF7p9p3iSsp5eSbpV6QT0nf0+AZ5mc9DIXg8PnjqSU9IIQogwN Y3oZswqs+gEZ9hc0yTvJvmMrMXJ8IrRY6vt7pVAX2AXB2ZfAKTAXUINOvdU2nAyQCF/B pQpKF7o17eoKNfGFY1odepTVMVaPSqLyVDUhFQrntRmqfGQJ9GArWoieTGNnqUDrXAB+ Bnuw== X-Gm-Message-State: ACrzQf0S3+q6A6uqUjz0kLw7Ocx/V7THrYnll7sx273gEZxwR6BBUStN hNDXic++VBk3hn1z9OPEMZTlAlcg0r4= X-Received: by 2002:a05:6000:10ce:b0:236:54c8:e040 with SMTP id b14-20020a05600010ce00b0023654c8e040mr5660243wrx.290.1667152330891; Sun, 30 Oct 2022 10:52:10 -0700 (PDT) Received: from localhost.localdomain (188.red-83-35-57.dynamicip.rima-tde.net. [83.35.57.188]) by smtp.gmail.com with ESMTPSA id q1-20020a05600c040100b003c4ecff4e25sm5419229wmb.9.2022.10.30.10.52.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Oct 2022 10:52:10 -0700 (PDT) From: Angel Iglesias To: linux-iio@vger.kernel.org Cc: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Andy Shevchenko , =?UTF-8?q?Nuno=20S=C3=A1?= , Jonathan Cameron , Angel Iglesias , Wolfram Sang , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 0/2] i2c: core: Introduce i2c_client_get_device_id helper Date: Sun, 30 Oct 2022 18:51:06 +0100 Message-Id: X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 Hello, I don't want to step anyone's work here, so I'm sending this RFC to the devs involved in the original discussion. I read on Uwe Kleine-König's patchset submission thread the necessity for an i2c helper to aid with the migration to the new i2c_driver .probe_new callback. Following the suggestions made there, I wrote this small patchset implementing the suggested helper function and ported the bmp280 IIO i2c probe to the new probe using that helper. Thanks for your time! Angel Original discussion thread for additional context: https://lore.kernel.org/all/20221023132302.911644-11-u.kleine-koenig@pengutronix.de/ Angel Iglesias (2): i2c: core: Introduce i2c_client_get_device_id helper function iio: pressure: bmp280: convert to i2c's .probe_new() drivers/i2c/i2c-core-base.c | 15 +++++++++++++++ drivers/iio/pressure/bmp280-i2c.c | 8 ++++---- include/linux/i2c.h | 1 + 3 files changed, 20 insertions(+), 4 deletions(-) base-commit: c32793afc6976e170f6ab11ca3750fe94fb3454d -- 2.38.1