From patchwork Wed Jan 27 17:46:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12050719 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F540C433DB for ; Wed, 27 Jan 2021 17:48:07 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5677164DA8 for ; Wed, 27 Jan 2021 17:48:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5677164DA8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:To:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=HLmkxEa8bCk6/CWj2Gdyd0avRAa3zlVquhdSI9pOqfo=; b=LuFl8AD202s8M6s+zS1Czo+61K KHE1F7yu5FytaHLYVLGjI7hhwPJm/DHLnkFW7yAgzPTmQ/7f94x8XrGJ/F382mLqStaCev1Wsn+E4 uMVG1l4UD8LB8twC59aqjzreSvTVhH2UJ5MmlYax2OBn0IEon6Fr5YXBh4kfuKSNl+WKEaZAJoMU0 /55sGooX21agheYPoF/+97u1zEG68IqWSMsDcYN0ym9WTXad6IZ948h8XlG74weR4z0LKhSW6p/ih PuqcfD7PfYdZMNBu/i3OdlQL/9mxwb5vqfmHliN1GaSNgGnjaY36MsWHkfKD9+Vl12RIzjUObomkE +hGTDuaQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4ou1-0002x6-Mj; Wed, 27 Jan 2021 17:46:49 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4otw-0002ty-Me for linux-arm-kernel@lists.infradead.org; Wed, 27 Jan 2021 17:46:46 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 532D064DB1; Wed, 27 Jan 2021 17:46:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611769603; bh=awOKI+XahHrzKqFqIy2x/6lyBTxRkf5j29o/Rpfi+pg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=m3u3hMcND3YBEhX700GAcxV5KDOYlTcCV/ZXzAphI3eZ9DaKJ5Ec1kKCWWui/Fmey POQ6Xi69PmNNsaYS09Az66I3HL5PM/gNbdJhzjySimKRPVQpSTajFm+6nIdNq87i8L UOXJnaZ4Ujqsv+vPB/HwvAT/luuRXinFqeFA4JfUPdPZjZ8eFpQUIykD36V94uuu6k 6CNpipVaW0lWLsF9O+0A2U8uzS9WT/X+4b3Vxp7bPU8uHeLeGQFV+woLBtVk5WoWOS MUQGy8IOf9lD64lvVaX6ONphinlM0CLhkF5D0jlybUvaGqUT4f5EJeCyUESCAKKewK 3cxXtZIfNfxGA== From: Krzysztof Kozlowski To: Sakari Ailus , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 2/4] media: i2c: imx258: add support for binding via device tree Date: Wed, 27 Jan 2021 18:46:33 +0100 Message-Id: <20210127174635.3596-2-krzk@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210127174635.3596-1-krzk@kernel.org> References: <20210127174635.3596-1-krzk@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210127_124644_941376_10D76F88 X-CRM114-Status: GOOD ( 13.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The IMX258 can be used also on embedded designs using device tree so allow the sensor to bind to a device tree node. Signed-off-by: Krzysztof Kozlowski --- Changes since v1: 1. None --- drivers/media/i2c/imx258.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/media/i2c/imx258.c b/drivers/media/i2c/imx258.c index df62c69a48c0..ba7f29622974 100644 --- a/drivers/media/i2c/imx258.c +++ b/drivers/media/i2c/imx258.c @@ -1291,11 +1291,18 @@ static const struct acpi_device_id imx258_acpi_ids[] = { MODULE_DEVICE_TABLE(acpi, imx258_acpi_ids); #endif +static const struct of_device_id imx258_dt_ids[] = { + { .compatible = "sony,imx258" }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, imx258_dt_ids); + static struct i2c_driver imx258_i2c_driver = { .driver = { .name = "imx258", .pm = &imx258_pm_ops, .acpi_match_table = ACPI_PTR(imx258_acpi_ids), + .of_match_table = imx258_dt_ids, }, .probe_new = imx258_probe, .remove = imx258_remove,