Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1881292rwb; Thu, 17 Nov 2022 03:31:47 -0800 (PST) X-Google-Smtp-Source: AA0mqf4oI9FMgCcekQ2FfK4G8ygc7ylI8GTOtBjEoL/5rcaXhlx+giJwaUiBuLaee21Z/Xx2Fs04 X-Received: by 2002:a17:902:ab56:b0:17f:8514:cf33 with SMTP id ij22-20020a170902ab5600b0017f8514cf33mr2317283plb.101.1668684707557; Thu, 17 Nov 2022 03:31:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668684707; cv=none; d=google.com; s=arc-20160816; b=f/catjTu1avi5tK7kmK7wBfCckAe7jCX76ew/IrwqAmHUrPHInsjh6/lZmxnl5Bt88 hJi7Q75GSqwrndLBsBEj2v5xWDy4S0S12EtN51DQJQwGHLzd8QPK69SS/KFmJNoyyqIf dZiqInHCDnJtiEr0zyCDeTSroYWlTugUctrtGU7de4vb0zIFXOSU6Ol/pk4WH5KN3Z9Q tf1zgyJqiKg1MlBgCt+C4Twsm3GB8dvbhD2JiMmetCITfGxWvS6k1qLaQ+wt+Hw5CGSB IsP5nlZXzAFMU4q6kBLVp/xc6Zw/Zgo43bHPO1Zf6za4tF3LtmV3AxHHWcdzwS7+ZBBX Hs5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=zzwTxfT1x+tdpgooP5ivmkX3RVGqdvT7BZT7qtokX5U=; b=trMinyY7CZG5kjmSTKUn4PlhZHzMOukJPOmnziUZF6IRGE5mCRJljnpxa5JvgYYvPM 5tRBWzQf+sJC7Mxvx4CEXBQVoqHLhyCOBsbGdoJzNRnQ8305mpSMnUKq81VDAuRJ1ssK M2KG118j5S5i9yZ+jfAyhZRq7bjBYudmAKXk8IbgD5kddVXp7nb8y1fy+dgkzQH6scss eVowrq6TjdisXX7M5u7dugoOKYFKk71sw20Xn8oVUcYYg7WIv0kDM/XiDr5NlOhlgQ0a 4rPgenhibDLW2RM1lRgBUyO9bARPvvdRWyDOOOaVfO3vZeNOjJmESoO0QN+yQZ+EMP6V ahdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PtFjqmwa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pj5-20020a17090b4f4500b002135a4d80d7si669410pjb.188.2022.11.17.03.31.35; Thu, 17 Nov 2022 03:31:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PtFjqmwa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239536AbiKQLFu (ORCPT + 91 others); Thu, 17 Nov 2022 06:05:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239520AbiKQLFn (ORCPT ); Thu, 17 Nov 2022 06:05:43 -0500 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7D6C40905 for ; Thu, 17 Nov 2022 03:05:39 -0800 (PST) Received: by mail-ed1-x52f.google.com with SMTP id i21so1981980edj.10 for ; Thu, 17 Nov 2022 03:05:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=zzwTxfT1x+tdpgooP5ivmkX3RVGqdvT7BZT7qtokX5U=; b=PtFjqmwatJ5oqPLC4R30ElTZwVzSAVrYN4IpUUL3lJQSpqW0H0zorYOwqMAt6V5KFk 5K+meFzNSqT+2CqiLnHBPJzBdmTUrqDL8Nv+UlNDox6Rm+e9YoQWBAkPEWq45ECL7NKM wZvul+J5+6VI2wtIsjl3qK33oyYI6IoGN0gj8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=zzwTxfT1x+tdpgooP5ivmkX3RVGqdvT7BZT7qtokX5U=; b=PI4xFzUvsNMJKJ92HKkPTJ9WDXU5AWRpX5MRff9l4IBdIzvRQRw4dKDqvfVD73Y2XY UarmHcpnohwKcM1IOUvVGrAcS8cCysKszCuFe6m6XqUNyH2KASXHjPyGIscSfPVMAu8Y 1UXuWWnR9e3+1BmIPgLxpvzZpvimaM6n/e4+/VRv/9Yl+MlX+9igpI0Wgw1BE1LGcuzh yYuhayDDfoB3Pr8zwWbzj0ZiAvaGRs4kq6FofEdnyAWT8sRoPPaL37HeKTFNebJoc8E/ AFO4xJFrzGoL78k7sa2GoHgPgNhihai4xCrQjhtShRj0bcB0tWklG7cRgNmAF7rNkOuo JrJQ== X-Gm-Message-State: ANoB5pmCosBduFNyH4ZDXZXjn3glmGcx7LrP4Et623ZlvMWq2S/VN1n7 2G/8nY2ddY6uSsAXlLkCfDTqFw== X-Received: by 2002:a05:6402:43cd:b0:467:c68b:b06c with SMTP id p13-20020a05640243cd00b00467c68bb06cmr1612431edc.428.1668683138482; Thu, 17 Nov 2022 03:05:38 -0800 (PST) Received: from tom-ThinkPad-T14s-Gen-2i (net-188-217-54-207.cust.vodafonedsl.it. [188.217.54.207]) by smtp.gmail.com with ESMTPSA id cw24-20020a056402229800b0046730154ccbsm392234edb.42.2022.11.17.03.05.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 03:05:38 -0800 (PST) Date: Thu, 17 Nov 2022 12:05:36 +0100 From: Tommaso Merciai To: Dmitry Torokhov Cc: Mauro Carvalho Chehab , Sylwester Nawrocki , Andrzej Hajda , Linus Walleij , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: Re: [PATCH 3/4] media: i2c: s5c73m3: remove support for platform data Message-ID: <20221117110536.GC2725180@tom-ThinkPad-T14s-Gen-2i> References: <20221115221145.2550572-1-dmitry.torokhov@gmail.com> <20221115221145.2550572-3-dmitry.torokhov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221115221145.2550572-3-dmitry.torokhov@gmail.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 15, 2022 at 02:11:44PM -0800, Dmitry Torokhov wrote: > There are no existing users of s5c73m3_platform_data in the tree, and > new users shoudl either be using device tree, ACPI, or static device > properties, so let's remove it from the driver. > > Reviewed-by: Linus Walleij > Signed-off-by: Dmitry Torokhov > --- > drivers/media/i2c/s5c73m3/s5c73m3-core.c | 19 ++------ > drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c | 2 - > drivers/media/i2c/s5c73m3/s5c73m3.h | 6 ++- > include/media/i2c/s5c73m3.h | 56 ----------------------- > 4 files changed, 9 insertions(+), 74 deletions(-) > delete mode 100644 include/media/i2c/s5c73m3.h > > diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c b/drivers/media/i2c/s5c73m3/s5c73m3-core.c > index d96ba58ce1e5..561c1a1583ac 100644 > --- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c > +++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c > @@ -27,7 +27,6 @@ > #include > #include > #include > -#include > #include > > #include "s5c73m3.h" > @@ -1592,26 +1591,16 @@ static int s5c73m3_parse_gpios(struct s5c73m3 *state) > return 0; > } > > -static int s5c73m3_get_platform_data(struct s5c73m3 *state) > +static int s5c73m3_get_dt_data(struct s5c73m3 *state) > { > struct device *dev = &state->i2c_client->dev; > - const struct s5c73m3_platform_data *pdata = dev->platform_data; > struct device_node *node = dev->of_node; > struct device_node *node_ep; > struct v4l2_fwnode_endpoint ep = { .bus_type = 0 }; > int ret; > > - if (!node) { > - if (!pdata) { > - dev_err(dev, "Platform data not specified\n"); > - return -EINVAL; > - } > - > - state->mclk_frequency = pdata->mclk_frequency; > - state->gpio[STBY] = pdata->gpio_stby; > - state->gpio[RSET] = pdata->gpio_reset; > - return 0; > - } > + if (!node) > + return -EINVAL; > > state->clock = devm_clk_get(dev, S5C73M3_CLK_NAME); > if (IS_ERR(state->clock)) > @@ -1666,7 +1655,7 @@ static int s5c73m3_probe(struct i2c_client *client) > return -ENOMEM; > > state->i2c_client = client; > - ret = s5c73m3_get_platform_data(state); > + ret = s5c73m3_get_dt_data(state); > if (ret < 0) > return ret; > > diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c b/drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c > index 141ad0ba7f5a..1c8103670fa2 100644 > --- a/drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c > +++ b/drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c > @@ -10,7 +10,6 @@ > #include > #include > #include > -#include > #include > #include > #include > @@ -24,7 +23,6 @@ > #include > #include > #include > -#include > > #include "s5c73m3.h" > > diff --git a/drivers/media/i2c/s5c73m3/s5c73m3.h b/drivers/media/i2c/s5c73m3/s5c73m3.h > index c3fcfdd3ea66..d68528898249 100644 > --- a/drivers/media/i2c/s5c73m3/s5c73m3.h > +++ b/drivers/media/i2c/s5c73m3/s5c73m3.h > @@ -15,7 +15,6 @@ > #include > #include > #include > -#include > > #define DRIVER_NAME "S5C73M3" > > @@ -357,6 +356,11 @@ enum s5c73m3_gpio_id { > GPIO_NUM, > }; > > +struct s5c73m3_gpio { > + int gpio; > + int level; > +}; > + > enum s5c73m3_resolution_types { > RES_ISP, > RES_JPEG, > diff --git a/include/media/i2c/s5c73m3.h b/include/media/i2c/s5c73m3.h > deleted file mode 100644 > index a51f1025ba1c..000000000000 > --- a/include/media/i2c/s5c73m3.h > +++ /dev/null > @@ -1,56 +0,0 @@ > -/* > - * Samsung LSI S5C73M3 8M pixel camera driver > - * > - * Copyright (C) 2012, Samsung Electronics, Co., Ltd. > - * Sylwester Nawrocki > - * Andrzej Hajda > - * > - * This program is free software; you can redistribute it and/or > - * modify it under the terms of the GNU General Public License > - * version 2 as published by the Free Software Foundation. > - * > - * This program is free software; you can redistribute it and/or modify > - * it under the terms of the GNU General Public License as published by > - * the Free Software Foundation; either version 2 of the License, or > - * (at your option) any later version. > - */ > -#ifndef MEDIA_S5C73M3__ > -#define MEDIA_S5C73M3__ > - > -#include > -#include > - > -/** > - * struct s5c73m3_gpio - data structure describing a GPIO > - * @gpio: GPIO number > - * @level: indicates active state of the @gpio > - */ > -struct s5c73m3_gpio { > - int gpio; > - int level; > -}; > - > -/** > - * struct s5c73m3_platform_data - s5c73m3 driver platform data > - * @mclk_frequency: sensor's master clock frequency in Hz > - * @gpio_reset: GPIO driving RESET pin > - * @gpio_stby: GPIO driving STBY pin > - * @bus_type: bus type > - * @nlanes: maximum number of MIPI-CSI lanes used > - * @horiz_flip: default horizontal image flip value, non zero to enable > - * @vert_flip: default vertical image flip value, non zero to enable > - */ > - > -struct s5c73m3_platform_data { > - unsigned long mclk_frequency; > - > - struct s5c73m3_gpio gpio_reset; > - struct s5c73m3_gpio gpio_stby; > - > - enum v4l2_mbus_type bus_type; > - u8 nlanes; > - u8 horiz_flip; > - u8 vert_flip; > -}; > - > -#endif /* MEDIA_S5C73M3__ */ > -- > 2.38.1.431.g37b22c650d-goog > Looks good to me. Reviewed-by: Tommaso Merciai -- Tommaso Merciai Embedded Linux Engineer tommaso.merciai@amarulasolutions.com __________________________________ Amarula Solutions SRL Via Le Canevare 30, 31100 Treviso, Veneto, IT T. +39 042 243 5310 info@amarulasolutions.com www.amarulasolutions.com