Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp884104imm; Sat, 22 Sep 2018 13:00:00 -0700 (PDT) X-Google-Smtp-Source: ACcGV63CqiugeczEi3NzdKmn3WS50AG6KGS237HCOlQA0A/6rgPQho8k3XEGNr3oggZ1XO9a4enk X-Received: by 2002:a63:ed55:: with SMTP id m21-v6mr3342130pgk.147.1537646400236; Sat, 22 Sep 2018 13:00:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537646400; cv=none; d=google.com; s=arc-20160816; b=rb5N/7fZ8OPshBSMrBwA8dNHJ9LUEdiY2Bakn3LEVd0GToK750t1sRwetM4jUeM0zH OoxWpurnmP+VyPANkq+Kq00b5V5PBcZAzJ4/X4gDn+MPcbhtY3Qnj3lorN0pEDCtUbOV AVvYkfF7t4tkf4xeBZr8D3dJKqszNnHt6vKcLWzF5ZSWnJ/w8t5W/kSua6GQRKaEL3jO UymYNQdr9Iq3hZRAbEqvnsvmWJVJIpcnVHo2FzA6G0BTHpmhYmZsNnqY1qy+IIjAmUbx 4L9TChu7JCcD9xpKM/M7fHO0b/C+8PZ7QN2ehHpLIi3gNVDxgDb6kqjtJpQrNJNyA+rU SsSQ== 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=VbrvP1uNTuDknwrXIilfCxny03oQS5m2jQLCjO29mbI=; b=E3Tp0K8CNyB0VeGqrvJtnJLWsPFzZ5/ZAC7k5GgZnlGsMbQ9/txKWtouIDeehzIgGz OGH7XoPdae0SbOEZycO061itbzExAY4XC84SqbEgoHuKIbSVNR5Gl9d+ENYiyglewrHX 3KOLb79r8U13bl4iEQIEG7TW6RkNzkw+goTMP2H05t/QcFD+0i/BnJ0zU+y4dtmbv4Cf zJNUf+vPDTlXv0gQM3ApynLHl/eHjt78JcIB9L1CO6XgX+HkRvbH5QqZgmRs/Z6y0qhu 5S6Vp5D4u9bJj9f2KW6dEO2O3NTdki2ph7kBXrDlYbnsc2jkC3uZgV88CSYcn/LUId4l 85XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NbnibF8i; 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 98-v6si2460187pla.59.2018.09.22.12.59.45; Sat, 22 Sep 2018 13:00:00 -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=NbnibF8i; 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 S1728175AbeIWByV (ORCPT + 99 others); Sat, 22 Sep 2018 21:54:21 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:33253 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726791AbeIWByU (ORCPT ); Sat, 22 Sep 2018 21:54:20 -0400 Received: by mail-io1-f68.google.com with SMTP id l25-v6so1826004ioj.0; Sat, 22 Sep 2018 12:59:35 -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=VbrvP1uNTuDknwrXIilfCxny03oQS5m2jQLCjO29mbI=; b=NbnibF8i1bCKCMzn2+sbgoOeVUotm709aaSDmvUsBBp3QK/vduoCUSUxvnTn/cd3Lu mOMbrVHgoMCIWZxjQoDGDqHIV1OdeQVzabIeRAteeidXoXkrqjB8yuIWCItzLUTWSt+Y IFDqfyHkOVI8ldqMDCMBPWkzL4zn/sDIt68kQsPv3iN6WbXdqPx7PgtYA7YkLZ7v0BdI idki9xH8oVE47arqdUpCJI0sUAO4rlHB0U56zPYEHvM9gIzMEy4mqH2GGSjQTw1QYOkk WoJmX45OaL/eAW8KuQC54WLRyq1sAHBveIjg19v6vY9v53fq4pMr+H0IF2DWYuuTryEe Op6g== 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=VbrvP1uNTuDknwrXIilfCxny03oQS5m2jQLCjO29mbI=; b=JJFMB38yxc9cdY+sZIfaM3fzueY8SF6JRQ5na7XVJgPjR0sxJVnNuFUd5b7M8lLCmO iZDxnG8sIDqteDI0xYirwqZHoyZNftEKjhJ2EFyApZne+MhtS/we65ctyXuknDvwZAzq ln0vfhcKdbtdwZ8fx+L18EuP40ac7crc9Uz39Dsg4rd1gh0tgFnmOt0xmasPR6MRWGdr tjry5JtOkfrqQIN97MEPFre9pnVuySTW0kyyhhRSZz7Ax9Vybilh+8rRFd07zbRoX+Xh 8UmTCdjF65l6AiVlkpZcsnmlKj6dd0TOn599mPh79ms0TDCuQZSLLQoW/4WB5ETT6VdV HHHg== X-Gm-Message-State: ABuFfogBHlXONo6qww5Se3RuoeG4RBJeOB9IgeE0dak0fRFegFsn+CIK TfTV2nY/iwzBS+YsSNcyzg== X-Received: by 2002:a6b:1842:: with SMTP id 63-v6mr2203279ioy.40.1537646375202; Sat, 22 Sep 2018 12:59:35 -0700 (PDT) Received: from localhost.localdomain (CPE1cabc0918a93-CM1cabc0918a90.cpe.net.cable.rogers.com. [99.229.26.117]) by smtp.gmail.com with ESMTPSA id h66-v6sm1095021ita.22.2018.09.22.12.59.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Sep 2018 12:59:34 -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 v2 2/2] iio: light: bh1750: Add device tree support Date: Sat, 22 Sep 2018 15:59:22 -0400 Message-Id: <20180922195922.24791-2-decatf@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180922195922.24791-1-decatf@gmail.com> References: <20180922195922.24791-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 --- Changes in v2: - Export module device table 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..ffe2e6d9c2e4 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 = of_match_ptr(bh1750_of_match), .pm = &bh1750_pm_ops, }, .probe = bh1750_probe, -- 2.17.1