From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C13BC433DF for ; Sun, 18 Oct 2020 19:51:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1DA9920714 for ; Sun, 18 Oct 2020 19:51:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=beagleboard-org.20150623.gappssmtp.com header.i=@beagleboard-org.20150623.gappssmtp.com header.b="BQxDadjf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388180AbgJRTvV (ORCPT ); Sun, 18 Oct 2020 15:51:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733196AbgJRTvS (ORCPT ); Sun, 18 Oct 2020 15:51:18 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8672C0613CE for ; Sun, 18 Oct 2020 12:51:09 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id b23so4733370pgb.3 for ; Sun, 18 Oct 2020 12:51:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beagleboard-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=sIt/5JujlB6JFqG5FlI8hqoFH66bW6x+4VT1ughej00=; b=BQxDadjfsCLiik+IkvTtZtfyMyujpv3pb63Qfonz9b0rwxX3lVmQzy8ORjjyFg/In7 q6wgDrzB77BzoE8bi4YJ6yKmUFLJjFk0439ViEerofZRpynMnjxWrX9kgalhzcZlQlpH C1aId5zKCgjYsiQzvK+mn9AI61T8Vy4JVaM0ocE9utj7/3E70DMl+P5t+6sKVc2WKPwH LBu6dWYq2mSIk/KleOFa+AilgUf+q1guOS5SAi4qnRT6wnlIK+J9PKr6xhlYtIpFDpfP E675QwMJGJkoDO4bLPbyHySakLrrCMStB1tOTf0lkaTU/wP5gUkn05B2WiQs9rjJ3ifb 4EBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=sIt/5JujlB6JFqG5FlI8hqoFH66bW6x+4VT1ughej00=; b=ZObl2A/x76b2IEmBYuAEhV6Pw1r3AC6YZYyMcy8GlvBHm9WyAOnzo00ARr0jsGnhkG yNTN/B1n1Of8jJ9XvHSvAtnlRVZr/Nj5ZloDBbmZr43uGiaYwic7QARSRRiEg+HVd9yG Uw9QgiAVXmDS3GvDdlJEO7bzVzjcWVp5alXobrr+PfMTbUp/nvtrmgXNjUVbYl0FKK+S dOMhoZEqJTGhIujzofIhSu2mcEvnCTi5LmWLJ4bkAr+KDMWVZz2BjsbkZTSwfRZOk1Tx uwU5zReXelHU8uv5VnrMKPBz8rNiFz+jIdKeMdQSLJJLfECgnCo4WCRwRkkvClL2SLci J/AA== X-Gm-Message-State: AOAM532Q2cTc2FDH3QUCpsn70BPGIeyTH/dPK9HRWnKvhEfoT+2Y4fUo I7+Kq8NC1S1i+x5pgie+mbb0 X-Google-Smtp-Source: ABdhPJxpgV6cZKslMeZEvYR4Q87Cs7jyaSon4Vn89HymTfEufCrfQsGFqlRJT54hI0hIvBA54/3+lQ== X-Received: by 2002:a63:1e02:: with SMTP id e2mr1664417pge.74.1603050669224; Sun, 18 Oct 2020 12:51:09 -0700 (PDT) Received: from ubuntu ([116.68.78.80]) by smtp.gmail.com with ESMTPSA id 23sm9132167pgr.53.2020.10.18.12.51.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Oct 2020 12:51:08 -0700 (PDT) Date: Mon, 19 Oct 2020 01:21:02 +0530 From: Vaishnav M A To: andy.shevchenko@gmail.com, jic23@kernel.org, wsa@kernel.org, songqiang1304521@gmail.com, knaack.h@gmx.de, lars@metafoo.de, alexandru.ardelean@analog.com, matt.ranostay@konsulko.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: jkridner@beagleboard.org, drew@beagleboard.org, robertcnelson@beagleboard.org, rajkovic@mikroe.com, vaishnav@beagleboard.org Subject: [PATCH v4] iio: proximity: vl53l0x-i2c add i2c_device_id Message-ID: <20201018195102.GA814713@ubuntu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add i2c_device_id table for the vl53l0x-i2c driver, helps in device instantiation using i2c_new_client_device() or from userspace in cases where device-tree based description is not possible now, like device(s) on a gbphy i2c adapter created by greybus. Signed-off-by: Vaishnav M A --- v4: -update commit message, add punctuation v3: -modify commit message for readability as suggested by Jonathan Cameron v2: -fix commit message drivers/iio/proximity/vl53l0x-i2c.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/iio/proximity/vl53l0x-i2c.c b/drivers/iio/proximity/vl53l0x-i2c.c index 5fbda9475ba9..7c29d4cae24a 100644 --- a/drivers/iio/proximity/vl53l0x-i2c.c +++ b/drivers/iio/proximity/vl53l0x-i2c.c @@ -143,6 +143,12 @@ static int vl53l0x_probe(struct i2c_client *client) return devm_iio_device_register(&client->dev, indio_dev); } +static const struct i2c_device_id vl53l0x_id[] = { + { "vl53l0x", 0}, + { } +}; +MODULE_DEVICE_TABLE(i2c, vl53l0x_id); + static const struct of_device_id st_vl53l0x_dt_match[] = { { .compatible = "st,vl53l0x", }, { } @@ -155,6 +161,7 @@ static struct i2c_driver vl53l0x_driver = { .of_match_table = st_vl53l0x_dt_match, }, .probe_new = vl53l0x_probe, + .id_table = vl53l0x_id, }; module_i2c_driver(vl53l0x_driver); -- 2.25.1