Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2174438imm; Sat, 15 Sep 2018 10:45:14 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbBLrihM4aLA3LvE6+0ymBW8Dbhuva75qxvr02Jv70q+sDuxOkmhnzd5TDtZsZCivUAYf1+ X-Received: by 2002:a62:398c:: with SMTP id u12-v6mr18468063pfj.9.1537033514848; Sat, 15 Sep 2018 10:45:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537033514; cv=none; d=google.com; s=arc-20160816; b=LVyx3ijTepWFsKjFzraqmsrstJwaELrBBPCue5XUdvzOiJYyq6D3Y6WvnCUA617YEx Ft8Zr1EZ7IAww1V6+2vVFyTJgoFdbK7EdBYZ0q+v1OTsDmHZxVkL4vjpx1QYgzrBMQxL SCoZWykPcTg/NvoS6V5jvnALQ7yyV22haenwIvoHkurWiDS2WzkqTWEX5SHjgHtiX1Bi TyJSeOrnwQ0x/WqsXDuEXqkbXEIOOfG482q1fu37hRz9/vaNpL4ZNsu9qBC/8UlCUhqp pW5IjpkU2qHaFHawTfRHvrJOkFEYig9+G/H5IIam+F6Z2AIhefq1Zzlj3OlYbZfKv7fL N5zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=l4VD3BspkK8BubwQU6AvhOg5G3OK97wGcnQLkeUe9yw=; b=xMlETJgIFGRPvzTwQVva8+tzOGoD7KxipFmWl8LKt2JfsjsyNOmCOmOeEVasTRoE1A 5k9beFJS+ebdNROyrggnAt/hsGayvMIjYCkgQUFl+lYmoCRMZIfe1YhEtcMNq/9gZ9Aa ++6sPfpv9dTYhMNDqXqyEBGMq0NVOJ4JZXBpUY/DbFWMN7rzUjN+dqiSFwiK3BSSDLbY 5L0jbdFdK7VKhSvsRuYr9jSIf4KlPQVyqRa2V5TP7EyMuT807Xd8Dg/FIUFy3oTLQjTc FgrmE4NAmh8C1ebkqsckFdcaAOhjjlAFaquay4MI/6LQeLNBErAFmbpH2pqBd2UJX/A1 mJLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EgLPgBKI; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k1-v6si10092479pld.424.2018.09.15.10.44.58; Sat, 15 Sep 2018 10:45:14 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=EgLPgBKI; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727787AbeIOXCU (ORCPT + 99 others); Sat, 15 Sep 2018 19:02:20 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:37034 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727690AbeIOXCU (ORCPT ); Sat, 15 Sep 2018 19:02:20 -0400 Received: by mail-io1-f65.google.com with SMTP id v14-v6so8473965iob.4; Sat, 15 Sep 2018 10:42:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=l4VD3BspkK8BubwQU6AvhOg5G3OK97wGcnQLkeUe9yw=; b=EgLPgBKItRo5xcpExBw/L9+fp84DTPAJ8vz0RMxWn8ll5qPaGHl99k0QQ5IYiPF+5k S2JdC5AnKtz3hqaXCRTNDjr5gAbFePKFJ07oU3JAzlP03ye5FqJkPMVLbwyu40IESGC9 +pBwuH54/YdgjM8rJls+osfxrtHNnZSMVSUMo8mE9YFKX237imzLKnGIuQxryWsIOzeM 6oHQzCiHNCkfzse+NDDlDap/GQwHbKdAC8/2d61VuS0BTCHulgrMdTeSn+S/2+zQhgxx s7VBOTFSyCWg82uX103jImhtbryuo63J7L0WQw8Zl1kPAk19BXaxkAHcRa2CY13dQkWn mZIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=l4VD3BspkK8BubwQU6AvhOg5G3OK97wGcnQLkeUe9yw=; b=J5KlmCcbhZNkrGiBe3YoG9o/Ir6jzrGoZyYpFWJEx/igClPr22oUAKJ4dE66rEtQLS Y1DcyVysgW8AsBONfwhkBpeZtdqaJ0aCqNau7VnWliocsFZDrEThvOc967a9IpRDFjnH nctKPB1r1k7N1b8ClJqdWuq/LFIGoX+0tWQ09cevA3b+cQxTOEe10eq0BKSizYe7v73h TU2T/bKCv23AFrJOnnpG7ls+qCX8pHD4LuFGRGXHJC5f9pFBox38UaArffdcMW5SlFX0 elrf8B2pmYgYRR/LUZuhKwkspW7TsfJvwJ08xmdQ6Ye1+vtIA8Zxso34K58Eo2lI8Or9 9HzA== X-Gm-Message-State: APzg51Bxo+gUekqyNwUxsXiqLYFaZn2FqcdhtLW6SK2Cj/BfWZQuMnxH nyDMrQGYMGYP+0nBHsvdog== X-Received: by 2002:a6b:f316:: with SMTP id m22-v6mr14143374ioh.271.1537033354312; Sat, 15 Sep 2018 10:42:34 -0700 (PDT) Received: from localhost.localdomain (CPE1cabc0918a93-CM1cabc0918a90.cpe.net.cable.rogers.com. [99.229.26.117]) by smtp.gmail.com with ESMTPSA id t187-v6sm1150250ita.28.2018.09.15.10.42.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 15 Sep 2018 10:42:33 -0700 (PDT) From: ryang To: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler Cc: Rob Herring , Mark Rutland , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ryang Subject: [PATCH 2/2] iio: light: bh1750: Add device tree support Date: Sat, 15 Sep 2018 13:42:14 -0400 Message-Id: <387c145949692c0318f90d98426be95c82ea2e58.1537033044.git.decatf@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add device tree support for ROHM BH1750 series ambient light sensors. Signed-off-by: ryang --- drivers/iio/light/bh1750.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/iio/light/bh1750.c b/drivers/iio/light/bh1750.c index a814828e69f5..50b599abb383 100644 --- a/drivers/iio/light/bh1750.c +++ b/drivers/iio/light/bh1750.c @@ -315,9 +315,19 @@ static const struct i2c_device_id bh1750_id[] = { }; MODULE_DEVICE_TABLE(i2c, bh1750_id); +static const struct of_device_id bh1750_of_match[] = { + { .compatible = "rohm,bh1710", }, + { .compatible = "rohm,bh1715", }, + { .compatible = "rohm,bh1721", }, + { .compatible = "rohm,bh1750", }, + { .compatible = "rohm,bh1751", }, + { } +}; + static struct i2c_driver bh1750_driver = { .driver = { .name = "bh1750", + .of_match_table = of_match_ptr(bh1750_of_match), .pm = BH1750_PM_OPS, }, .probe = bh1750_probe, -- 2.17.1