From patchwork Thu Jul 6 17:57:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Masney X-Patchwork-Id: 785239 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3x3QSb4ns0z9s76 for ; Fri, 7 Jul 2017 03:57:51 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=onstation.org header.i=@onstation.org header.b="WEfy4liz"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751853AbdGFR5u (ORCPT ); Thu, 6 Jul 2017 13:57:50 -0400 Received: from onstation.org ([52.200.56.107]:57966 "EHLO onstation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751734AbdGFR5t (ORCPT ); Thu, 6 Jul 2017 13:57:49 -0400 Received: from localhost.localdomain (c-98-236-77-125.hsd1.wv.comcast.net [98.236.77.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: masneyb) by onstation.org (Postfix) with ESMTPSA id F161F13; Thu, 6 Jul 2017 17:57:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=onstation.org; s=default; t=1499363868; bh=NCb/EBfPDl7agFn85vtmPvFuJ+k85f2SDMxK23cTs/4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WEfy4liz+tzg9Q1K/sU2K+LKJLQq3ZiZsHzXhOF5h4FDPS26Oe++e8H7kuelRPI+f ALdZyeyYvvneq39SZsbg5yI+x1RUkxsH/bT3h5iZhNSZW9qGPOM15ij1U0sR/NEIYN fyLU3TUkBB9rIibFf7Dufwpa/KFBRKfdJwu43quE= From: Brian Masney To: masneyb@onstation.org Cc: Rob Herring , Mark Rutland , devicetree@vger.kernel.org Subject: [PATCH v2 1/8] staging: iio: tsl2x7x: add of_match table for device tree support Date: Thu, 6 Jul 2017 13:57:37 -0400 Message-Id: <20170706175744.4842-2-masneyb@onstation.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170706175744.4842-1-masneyb@onstation.org> References: <20170706175744.4842-1-masneyb@onstation.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add device tree support for the tsl2x7x IIO driver with no custom properties. Signed-off-by: Brian Masney CC: Rob Herring CC: Mark Rutland CC: devicetree@vger.kernel.org --- Documentation/devicetree/bindings/trivial-devices.txt | 10 ++++++++++ drivers/staging/iio/light/tsl2x7x.c | 16 ++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/Documentation/devicetree/bindings/trivial-devices.txt b/Documentation/devicetree/bindings/trivial-devices.txt index 35f406d..0e6e953 100644 --- a/Documentation/devicetree/bindings/trivial-devices.txt +++ b/Documentation/devicetree/bindings/trivial-devices.txt @@ -21,6 +21,16 @@ adi,adt7490 +/-1C TDM Extended Temp Range I.C adi,adxl345 Three-Axis Digital Accelerometer adi,adxl346 Three-Axis Digital Accelerometer (backward-compatibility value "adi,adxl345" must be listed too) ams,iaq-core AMS iAQ-Core VOC Sensor +amstaos,tsl2571 AMS/TAOS ALS and proximity sensor +amstaos,tsl2671 AMS/TAOS ALS and proximity sensor +amstaos,tmd2671 AMS/TAOS ALS and proximity sensor +amstaos,tsl2771 AMS/TAOS ALS and proximity sensor +amstaos,tmd2771 AMS/TAOS ALS and proximity sensor +amstaos,tsl2572 AMS/TAOS ALS and proximity sensor +amstaos,tsl2672 AMS/TAOS ALS and proximity sensor +amstaos,tmd2672 AMS/TAOS ALS and proximity sensor +amstaos,tsl2772 AMS/TAOS ALS and proximity sensor +amstaos,tmd2772 AMS/TAOS ALS and proximity sensor at,24c08 i2c serial eeprom (24cxx) atmel,at97sc3204t i2c trusted platform module (TPM) capella,cm32181 CM32181: Ambient Light Sensor diff --git a/drivers/staging/iio/light/tsl2x7x.c b/drivers/staging/iio/light/tsl2x7x.c index 1467199..8148986 100644 --- a/drivers/staging/iio/light/tsl2x7x.c +++ b/drivers/staging/iio/light/tsl2x7x.c @@ -2026,6 +2026,21 @@ static struct i2c_device_id tsl2x7x_idtable[] = { MODULE_DEVICE_TABLE(i2c, tsl2x7x_idtable); +static const struct of_device_id tsl2x7x_of_match[] = { + { .compatible = "amstaos,tsl2571" }, + { .compatible = "amstaos,tsl2671" }, + { .compatible = "amstaos,tmd2671" }, + { .compatible = "amstaos,tsl2771" }, + { .compatible = "amstaos,tmd2771" }, + { .compatible = "amstaos,tsl2572" }, + { .compatible = "amstaos,tsl2672" }, + { .compatible = "amstaos,tmd2672" }, + { .compatible = "amstaos,tsl2772" }, + { .compatible = "amstaos,tmd2772" }, + {} +}; +MODULE_DEVICE_TABLE(of, tsl2x7x_of_match); + static const struct dev_pm_ops tsl2x7x_pm_ops = { .suspend = tsl2x7x_suspend, .resume = tsl2x7x_resume, @@ -2035,6 +2050,7 @@ static const struct dev_pm_ops tsl2x7x_pm_ops = { static struct i2c_driver tsl2x7x_driver = { .driver = { .name = "tsl2x7x", + .of_match_table = tsl2x7x_of_match, .pm = &tsl2x7x_pm_ops, }, .id_table = tsl2x7x_idtable,