Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp518431pxb; Wed, 6 Oct 2021 09:40:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsRz2zygAkiiwbXdA+6vZ0TDS3cHgcOGAUl18tMW7+iBh+dXIY7acyjW34cgGEZX+NOZvj X-Received: by 2002:a17:906:9501:: with SMTP id u1mr33052358ejx.496.1633538443887; Wed, 06 Oct 2021 09:40:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633538443; cv=none; d=google.com; s=arc-20160816; b=y1DEqsSigjXxXnepGfd0+QlVaOGx0Lwp27XZD5JXW5zg6Keta/JZP5tCnd1FGBpjo1 47KD8/vMvjh+O+eM/d0lSPJQzLmQzDcbrZZUpPELEHVPH7DSVP4asGUgdBkd04Y1CZda j546JwXwyR13Wevi1AC3B3ORl6ZC3/wppcOXcAhNVFpNhQHJTKPIIq/dpr/RJ/duG1UV 0LH9+1zW+lTfxWsnPhtGQq0NZqr81sxHUMPRbDigMkGoaLCueGaVm8pCcp4dBh3hulWW 9AAbbjjiPt7GAr8O46yOwbWzAC3iuuJQb1RvJlVnvb5e/nc/zqQRmKHipIJYpxsaFL+t MwLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TBMewwdvvmBGpb9so2bT+kALNqbuj3HmGHWTS+EL1N8=; b=zN+2ArcVdy4iMGQFGh2F1whpxoSKoP2Loh2hE1t/Bx7hOUbiNITSm5O1nIst2kCs78 bFLfFyL7FsR9/h3CLJxHf1ieSqeffDnckg5v9gvkLU70qFQoypwWebo69W+z7sbfUxDE PO4Rhb8Cffhde/2WuhWtFKIcS4ERT4/cHMgOY2wLc3q195zUAooYi85CqQ8anvldoX2q 6uufKaLPAONJ2yz61MH6QcehtYNkd2I2VTu0adLi/HDf0vjr0UNUM3kB5k9zNpgZxHvF MRVSPYqTrWhT9c/4356kMu5Lg1IOKAFb5yFvQmSVzmeF9ksHbbPhhXHrfHV3n9YccAjE if1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=qX0JPIMO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=trvn.ru Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y98si24480551ede.624.2021.10.06.09.40.19; Wed, 06 Oct 2021 09:40:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=qX0JPIMO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=trvn.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232673AbhJFQkt (ORCPT + 99 others); Wed, 6 Oct 2021 12:40:49 -0400 Received: from box.trvn.ru ([194.87.146.52]:36313 "EHLO box.trvn.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231259AbhJFQkt (ORCPT ); Wed, 6 Oct 2021 12:40:49 -0400 X-Greylist: delayed 457 seconds by postgrey-1.27 at vger.kernel.org; Wed, 06 Oct 2021 12:40:48 EDT Received: from authenticated-user (box.trvn.ru [194.87.146.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.trvn.ru (Postfix) with ESMTPSA id 8F488428D6; Wed, 6 Oct 2021 21:31:17 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1633537877; bh=RKX+UxOJaofOnl3psZgoVRHnWMDW48UJ8sAbexJ0pD4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qX0JPIMOsJgD/Dv2gqdB1D9egd7Qoip59izkv7zt2lM8Ha/ZMHDWLH0IayCGOwkSp v+aB7YnbqkK+k2Q2RqNYhigJZt6UVvlQJUaNG2mam5ezI2DpRiLhXXrCTMs/XQ/tHl gJkAH6Pbe7lxNxDER6bdFcMN77vv06nciqyuHPCs01cukFuvNMrOxGRhAyYcP9P080 3ebGG4jkz0z99k/aKmLlm0n8N+Wa9aJ8y+GhmBz9wOb/FpwG8oh92faFJ3JqqgncUe kihNnpJfpSqs3fubDziuzuBV1nUOt4xUv3DGwx2QwuQag2daw8/MOj0u2gNhQ8gsR8 vU/uHwMbESonA== From: Nikita Travkin To: jic23@kernel.org Cc: lars@metafoo.de, robh+dt@kernel.org, stephan@gerhold.net, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Nikita Travkin Subject: [PATCH 4/4] iio: light: ltr501: Add of_device_id table Date: Wed, 6 Oct 2021 21:30:58 +0500 Message-Id: <20211006163058.145842-4-nikita@trvn.ru> In-Reply-To: <20211006163058.145842-1-nikita@trvn.ru> References: <20211006163058.145842-1-nikita@trvn.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add of_device_id table so the driver can be used on DT platforms without relying on i2c_device_id fallback. (So DT schema validation is possible) Signed-off-by: Nikita Travkin --- drivers/iio/light/ltr501.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/iio/light/ltr501.c b/drivers/iio/light/ltr501.c index 57851c8ef1c6..7e51aaac0bf8 100644 --- a/drivers/iio/light/ltr501.c +++ b/drivers/iio/light/ltr501.c @@ -1609,9 +1609,18 @@ static const struct i2c_device_id ltr501_id[] = { }; MODULE_DEVICE_TABLE(i2c, ltr501_id); +static const struct of_device_id ltr501_of_match[] = { + { .compatible = "liteon,ltr501", }, + { .compatible = "liteon,ltr559", }, + { .compatible = "liteon,ltr301", }, + {} +}; +MODULE_DEVICE_TABLE(of, ltr501_of_match); + static struct i2c_driver ltr501_driver = { .driver = { .name = LTR501_DRV_NAME, + .of_match_table = ltr501_of_match, .pm = <r501_pm_ops, .acpi_match_table = ACPI_PTR(ltr_acpi_match), }, -- 2.30.2