Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp127664imm; Thu, 27 Sep 2018 17:30:44 -0700 (PDT) X-Google-Smtp-Source: ACcGV60DCjy47jNLU4YsoCuYRg385lCyxNhh0Kyu1uXraz+9hAmMcVvuZ62GSuPapKpGoVNKXrRM X-Received: by 2002:a17:902:784a:: with SMTP id e10-v6mr13389373pln.197.1538094644743; Thu, 27 Sep 2018 17:30:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538094644; cv=none; d=google.com; s=arc-20160816; b=zF/ijw0m26k98HIGsR3j7pl0NSp5C4By0JIEJvSvj494huH3uvYF3Qhguot7DMocBF rcQ3nQGWTgFLyzHY036hGuKN9fcSXQUNek8yxUNpy917w+MZSuI464bCgKpXNV6gPh8E E3v9IZm7U7/7VQJLTJbQuAjM/2VUOwou9Y/FHkzuIN1n+XF9UIYNnwc9OF41oLZf0wDf iH/khrha/CMMiAMKlTLxVpLC8Co+7moG/6/uD+VC3uJaMKHwsGbcwvJV729ogGdkAUlt pmmb3QHQrVNnXbDa5+Z84pvlzvYDxutsIwcPkiEZvGzTm98L5skT2OFs7RE8m+6KLym4 8N3g== 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:message-id:date :subject:cc:to:from:dkim-signature; bh=8fYX/tru7SU4upt3mATveHwXLBh2N/bLbdz5+sc27+Q=; b=BxTbkJHF/D0zRBcWXg4+XtH1XObhwTxrLWG75PYe0U3Iow0GN9nu0CTTS1pVKTRTqP 8i6/NCZQy4wBtnz5NVKZvnTSvi81s4A/6cTZdLk2fPlQJz0/ve+58MkxKekriTFwCo38 332e1BsDbQnXPijNhvjsYuDy04Ot96zdRNFa1CRhANBOgjqVNbDSmRbwEuRX2UB8Hnco DxklhoMLMTfZ8FaR9kLtOW3rxQZ9hZpskFmELnzZfwRUt/Y5/urbkLQCibVe6k+bY2IW g6PwGYBDJpl1LX0n75JFFLgE/L7fkkjMIuVvwu+k7EHscLyG1w4BE2Slj0Rp3wbfAde6 FCEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rM57r7uX; 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 t29-v6si3349868pgn.442.2018.09.27.17.30.28; Thu, 27 Sep 2018 17:30:44 -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=rM57r7uX; 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 S1728645AbeI1GvP (ORCPT + 99 others); Fri, 28 Sep 2018 02:51:15 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:37412 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725924AbeI1GvO (ORCPT ); Fri, 28 Sep 2018 02:51:14 -0400 Received: by mail-io1-f68.google.com with SMTP id v14-v6so3183939iob.4; Thu, 27 Sep 2018 17:30:16 -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; bh=8fYX/tru7SU4upt3mATveHwXLBh2N/bLbdz5+sc27+Q=; b=rM57r7uXkp6mUseEzOk4bMojRrSKEmfmb1bEnLl76wUtlzvokCdomZDcBoREyfiGS/ oo6ozwrJdH6wjJQ4/y0iYTMsMqaOgc/xfL6QZ/Q90riWKjtfbrUf8IlhjnpKELCDHwkn /nRrxODUFl3Yq5bRZhgrl6BNw/GwK3gYh7iy9E0zjttFeNeD5TNVJcmAA18WpiIJqqQJ ZiBuE85Hk3lECj3HD0H7QEGCfkvuQXAGc9oemaiFURfxk7IKRLoeGG1ramhRWEmTnm5U xEAyzful7SFZ+MYIdVQLcPbn+KganA2HgLF0w8+z9izi2UgeA0s+WeBTCfxrBh0qqDEq lc9A== 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; bh=8fYX/tru7SU4upt3mATveHwXLBh2N/bLbdz5+sc27+Q=; b=QMX1JUIYzTmWxIsrMU4nji6d7pR36J4biipwA7zFaqH3WRLwdtjw+nzuWomq6FcEeg gksIUe6ov8s7rMt+Z9RE7K1uV3VNhbFqhomMjCTH5bMNWmic63pVYlikdNKJFfDMG2ne rAzjML5ehjB/SNVBrgmtCQahMHpqltAlaoZE9bYRpIG33HkD9HVup+4nSkpQYVB88St6 mECzDPFwVXWv5b1YOW5scDCFhFz/muGXi9iaXfhCZoJWFa24o/OhljGakjHESTWlqEr9 oMG747OvexI1ufAhMguRkGejlzsbXcBofi0v71spBWdbyjavu1djL5HCH9jPbuW+nHyx tURg== X-Gm-Message-State: ABuFfoh48ovQTzk2oh+7GOf8cTZA3kJJDYMXfpYGrMHNxFJfn8OTblPc ieLeAnQnhkyhu+GlzGbtMg== X-Received: by 2002:a6b:c917:: with SMTP id z23-v6mr10417912iof.297.1538094616421; Thu, 27 Sep 2018 17:30:16 -0700 (PDT) Received: from localhost.localdomain (CPE1cabc0918a93-CM1cabc0918a90.cpe.net.cable.rogers.com. [99.229.26.117]) by smtp.gmail.com with ESMTPSA id i8-v6sm1355106ioa.6.2018.09.27.17.30.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 17:30:15 -0700 (PDT) From: ryang To: Jonathan Cameron Cc: Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Rob Herring , Mark Rutland , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ryang Subject: [PATCH v4 2/2] iio: light: bh1750: Add device tree support Date: Thu, 27 Sep 2018 20:29:58 -0400 Message-Id: <20180928002958.3935-2-decatf@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180928002958.3935-1-decatf@gmail.com> References: <20180928002958.3935-1-decatf@gmail.com> 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 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/iio/light/bh1750.c b/drivers/iio/light/bh1750.c index c3a481452b67..28347df78cff 100644 --- a/drivers/iio/light/bh1750.c +++ b/drivers/iio/light/bh1750.c @@ -307,9 +307,20 @@ 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", }, + { } +}; +MODULE_DEVICE_TABLE(of, bh1750_of_match); + static struct i2c_driver bh1750_driver = { .driver = { .name = "bh1750", + .of_match_table = bh1750_of_match, .pm = &bh1750_pm_ops, }, .probe = bh1750_probe, -- 2.17.1