From patchwork Tue Jun 25 04:05:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Dodge X-Patchwork-Id: 11014941 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5BBD314BB for ; Tue, 25 Jun 2019 07:30:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 475A91FE8B for ; Tue, 25 Jun 2019 07:30:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3933928492; Tue, 25 Jun 2019 07:30:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BE3D41FE8B for ; Tue, 25 Jun 2019 07:30:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DBFDC6E09E; Tue, 25 Jun 2019 07:28:33 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by gabe.freedesktop.org (Postfix) with ESMTPS id D54DA89E05 for ; Tue, 25 Jun 2019 04:05:54 +0000 (UTC) Received: by mail-qt1-x844.google.com with SMTP id a15so16942671qtn.7 for ; Mon, 24 Jun 2019 21:05:54 -0700 (PDT) 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=YXKj+IPUyIdf9CK0v5ukJZ+u/bRKPv2xw3vKk/om7oI=; b=ZEimQobpecSChnfpWl2uYkm958x7RgBlOgGwMlgIo2tpkMQSmZWOj0/aMVAlHHhcB/ NZBs7nmiaSAqNbSBYgGT2kduynOl4nnoRW2henGUllO+Hyf+ykyDqKD2htqUO7sb8Ubd zSDKCitxsiSwSzPQ1zzFtTpNEGn2qmv2QHe13h62rExuKZYzx67YxQVV6Te0KjSTlTnL MHDtjukv1P9MvT70uRQsVy8Lw2rsPGoXdnk7sAJ+9T4qnaSzrJLz76KQJFvGthtODlco L7KTz1tZ+nqakuB1zwHc7yPpb4lwP/buHVRBNJQT5xAEwDRQiEC4z1jRR5r3u7MEVsOF lYOg== X-Gm-Message-State: APjAAAXPPudas0ob25bRizqfd8SGsg9U/tAFizrl81cqLK7Pgw+5q1dK 41AmQdXwZA8UrFgEGgHavRM= X-Google-Smtp-Source: APXvYqy9WBYFmgKGSjQ3wQM1yf0IDmribmspEKiDwjqHsbJCHIWK+I1T8tXyiEAeJdYRRz3qKtD8gw== X-Received: by 2002:aed:3b1c:: with SMTP id p28mr127461530qte.312.1561435553984; Mon, 24 Jun 2019 21:05:53 -0700 (PDT) Received: from bdodge-linux-ub.fios-router.home (pool-100-0-123-202.bstnma.fios.verizon.net. [100.0.123.202]) by smtp.gmail.com with ESMTPSA id e8sm6741029qkn.95.2019.06.24.21.05.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 24 Jun 2019 21:05:53 -0700 (PDT) From: Brian Dodge To: pavel@ucw.cz Subject: [PATCH 2/2] backlight: arcxcnn: add "arctic" vendor prefix Date: Tue, 25 Jun 2019 00:05:29 -0400 Message-Id: <1561435529-7835-3-git-send-email-bdodge09@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1561435529-7835-1-git-send-email-bdodge09@gmail.com> References: <1561435529-7835-1-git-send-email-bdodge09@gmail.com> X-Mailman-Approved-At: Tue, 25 Jun 2019 07:27:07 +0000 X-Mailman-Original-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=YXKj+IPUyIdf9CK0v5ukJZ+u/bRKPv2xw3vKk/om7oI=; b=LChh0/FCvKa/98upK9LB6jvE9HzgZFrHPe76Ce49aYorrRjoequN81oTM3FMzb3jd5 8nggr3btnYII+db1QPjWhq+kqelC3o5xK5A6KvC6lnIxXyT4Q85Np6cZ+t0gXj6qE8nT xu6Oi6BLwVbu/exKZwJrvuCSGiAKZFAeFOT4c52CrsDrmpRa7z5HamrGTz7blynTDhzq +GfjVEVvywI6U7Tc/qGnjxUiRMe4NB2WAyCm9AOoiyG7/FmADbd8dwEFx+fEDA83P1Xr Orm2OVODkxYyl8IfkP1WJXZOVfS6AAHYmYl4RrED2NXfH7BlIyfruHgQNRuCOrmUcL2E ZG2A== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, daniel.thompson@linaro.org, Brian Dodge , jingoohan1@gmail.com, dri-devel@lists.freedesktop.org, robh+dt@kernel.org, jacek.anaszewski@gmail.com, pbacon@psemi.com, lee.jones@linaro.org, linux-leds@vger.kernel.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The original patch adding this driver and DT bindings improperly used "arc" as the vendor-prefix. This adds "arctic" which is the proper prefix and retains "arc" to allow existing users of the "arc" prefix to update to new kernels. There is at least one (Samsung Chromebook Plus) Signed-off-by: Brian Dodge Acked-by: Daniel Thompson --- drivers/video/backlight/arcxcnn_bl.c | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/drivers/video/backlight/arcxcnn_bl.c b/drivers/video/backlight/arcxcnn_bl.c index 7b1c0a0..14c67f2 100644 --- a/drivers/video/backlight/arcxcnn_bl.c +++ b/drivers/video/backlight/arcxcnn_bl.c @@ -1,9 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Backlight driver for ArcticSand ARC_X_C_0N_0N Devices + * Backlight driver for pSemi (formerly ArcticSand) ARC_X_C_0N_0N Devices * - * Copyright 2016 ArcticSand, Inc. - * Author : Brian Dodge + * Copyright 2016-2019 pSemi, Inc. + * Author : Brian Dodge */ #include @@ -191,27 +191,40 @@ static void arcxcnn_parse_dt(struct arcxcnn *lp) if (ret == 0) lp->pdata->initial_brightness = prog_val; - ret = of_property_read_u32(node, "arc,led-config-0", &prog_val); + ret = of_property_read_u32(node, "arctic,led-config-0", &prog_val); + if (ret) + ret = of_property_read_u32(node, "arc,led-config-0", &prog_val); if (ret == 0) lp->pdata->led_config_0 = (u8)prog_val; - ret = of_property_read_u32(node, "arc,led-config-1", &prog_val); + ret = of_property_read_u32(node, "arctic,led-config-1", &prog_val); + if (ret) + ret = of_property_read_u32(node, "arc,led-config-1", &prog_val); if (ret == 0) lp->pdata->led_config_1 = (u8)prog_val; - ret = of_property_read_u32(node, "arc,dim-freq", &prog_val); + ret = of_property_read_u32(node, "arctic,dim-freq", &prog_val); + if (ret) + ret = of_property_read_u32(node, "arc,dim-freq", &prog_val); if (ret == 0) lp->pdata->dim_freq = (u8)prog_val; - ret = of_property_read_u32(node, "arc,comp-config", &prog_val); + ret = of_property_read_u32(node, "arctic,comp-config", &prog_val); + if (ret) + ret = of_property_read_u32(node, "arc,comp-config", &prog_val); if (ret == 0) lp->pdata->comp_config = (u8)prog_val; - ret = of_property_read_u32(node, "arc,filter-config", &prog_val); + ret = of_property_read_u32(node, "arctic,filter-config", &prog_val); + if (ret) + ret = of_property_read_u32(node, + "arc,filter-config", &prog_val); if (ret == 0) lp->pdata->filter_config = (u8)prog_val; - ret = of_property_read_u32(node, "arc,trim-config", &prog_val); + ret = of_property_read_u32(node, "arctic,trim-config", &prog_val); + if (ret) + ret = of_property_read_u32(node, "arc,trim-config", &prog_val); if (ret == 0) lp->pdata->trim_config = (u8)prog_val; @@ -381,6 +394,8 @@ static int arcxcnn_remove(struct i2c_client *cl) } static const struct of_device_id arcxcnn_dt_ids[] = { + { .compatible = "arctic,arc2c0608" }, + /* here to remaim compatible with an older binding, do not use */ { .compatible = "arc,arc2c0608" }, { } }; @@ -404,5 +419,5 @@ static struct i2c_driver arcxcnn_driver = { module_i2c_driver(arcxcnn_driver); MODULE_LICENSE("GPL v2"); -MODULE_AUTHOR("Brian Dodge "); +MODULE_AUTHOR("Brian Dodge "); MODULE_DESCRIPTION("ARCXCNN Backlight driver");