From patchwork Mon Oct 24 11:12:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13017127 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7CCC0C38A2D for ; Mon, 24 Oct 2022 11:12:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229975AbiJXLMp (ORCPT ); Mon, 24 Oct 2022 07:12:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229925AbiJXLMo (ORCPT ); Mon, 24 Oct 2022 07:12:44 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76FD650BB5 for ; Mon, 24 Oct 2022 04:12:29 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id g7so16109758lfv.5 for ; Mon, 24 Oct 2022 04:12:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=GIb7O1CuYwaqhwQ5XdF+6gSVXwj5O21a/h2ohadqdbU=; b=GRdrZxJUqTwEhZENqlG5P5oi2IqRN9DeLMei8iIfSPPgla8xY28RArsuVdCOiyiL0/ PW8DZNNo+oI7qb1xRy7edjRpKk8uq2sMAPtPyxceIKBm5t/9Iz2V56eUJn2ZT3lVKCNg RAljw62dIynht/AajzwqUh5P0qhHyAvyfH4IgX4CjyL6s6nWMxD0UWq+lGRAK/r0/EKp xui4/wIR+Dg3SfJ+m2arBFlBSQHS0WIYX28JSJaJa5vGoRsNLFytp/FDhAYXypyG0K5H /FxjyS7JCZQJjbtowknMOTG1UIG5xm+zFL08QQRmjSmUzxFX39ILWtwE6qIfb3AnTEex wyvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GIb7O1CuYwaqhwQ5XdF+6gSVXwj5O21a/h2ohadqdbU=; b=jwRbhlvMzkiuH13OIjVkP7F6BgaL/k2wseTLjX7GVplcj8pQoYJQ+2dEXtjZxaLIoF EqsNUui2CFzl46hT2Pb+aR3vJObssjobhbYHQ3e/jNEFqlpNGF/cPnj0IQCpcAN+LdsG +6A5om8to+NScKRvG5nB9ZgpAbYkDnQZn8m1ZtlejpeSW09yXOySpxIcrVxY3Jef2aJm UPkoC/DUJUqR3NyAQ+3FAhUw/PM5qdvUDM5ozkzmADn8EvyhQE1HPXbFa6pR7uhON9PQ eVXTrqyVbtDwLPpgttdn4t4FEX5vUBRN3j9GBSeiP5AVNrmUDHW2ZL5SmumMrAQt/UcQ y/ug== X-Gm-Message-State: ACrzQf3WKk6L1v7JFRk9G4zmc8DyUHuOObEspOdTQRqi/HElNPY1iOks GNBk1Lmkyr0VUn2pQprFCVPF8w== X-Google-Smtp-Source: AMsMyM6bd8nd8jGMgjukQZt8qZcN1t3Y0pILto5+FozDLJJOFB0udatPnPvFGFF1g2bws8UJ3sny5Q== X-Received: by 2002:ac2:5ede:0:b0:4a4:a373:db42 with SMTP id d30-20020ac25ede000000b004a4a373db42mr10475075lfq.603.1666609947137; Mon, 24 Oct 2022 04:12:27 -0700 (PDT) Received: from fedora.. ([85.235.10.72]) by smtp.gmail.com with ESMTPSA id g22-20020a2eb5d6000000b0026de1bf528esm4821692ljn.119.2022.10.24.04.12.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:12:26 -0700 (PDT) From: Linus Walleij To: Mauro Carvalho Chehab , linux-media@vger.kernel.org Cc: Linus Walleij , Akinobu Mita Subject: [PATCH 1/3 v3] media: ov2640: Drop legacy includes Date: Mon, 24 Oct 2022 13:12:21 +0200 Message-Id: <20221024111223.7142-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The driver was including legacy headers despite using just . Drop the surplus includes. Cc: Akinobu Mita Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - Rebase on v6.1-rc1 ChangeLog v1->v2: - Rebase on v6.0-rc1 --- drivers/media/i2c/ov2640.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/media/i2c/ov2640.c b/drivers/media/i2c/ov2640.c index 29ed0ef8c033..39d56838a4ef 100644 --- a/drivers/media/i2c/ov2640.c +++ b/drivers/media/i2c/ov2640.c @@ -16,9 +16,7 @@ #include #include #include -#include #include -#include #include #include From patchwork Mon Oct 24 11:12:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13017128 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66079ECAAA1 for ; Mon, 24 Oct 2022 11:12:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229925AbiJXLMs (ORCPT ); Mon, 24 Oct 2022 07:12:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229934AbiJXLMq (ORCPT ); Mon, 24 Oct 2022 07:12:46 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1869555082 for ; Mon, 24 Oct 2022 04:12:30 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id be13so16120171lfb.4 for ; Mon, 24 Oct 2022 04:12:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fYOlNCUKLgVxmaDYjeCCoItxD2KXkExW1cGm20+HKlA=; b=Pg4s0nZLcILe2QaBr2Wjf82gccWT/ojUz+mz6l6Giky+uTeSeuZk45krpmg0rGGx9k p070bDXLvkrCQM4nAwjR6gzM7A4nzdxsL17tAklg+nKc/rvWCJJ7KIkGJHerf0D1xLLB m0W21vDjm2+aaVqfhV5naGWlWR2/jhB2xwOgarng1YLY+z35T81u8DVESgl2qAgiYDhE BZ/yh/LjVeCdfvrEBld5GywaVmyvMgxbq13B5mzVSs2eDg+32TzG3I22uWcALmA047cH EXXE2p7m0Txg75QlXpb+OXoaKA6Yui1n26V0ZYRnMBvU4EllS+uMtDHWhXllI32u8Z2G FJbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fYOlNCUKLgVxmaDYjeCCoItxD2KXkExW1cGm20+HKlA=; b=7gcOpTD9SKy5EmjGL6uidLG2MxnWun1NW4Wt619hYhuhG7Ixyb/1YIP4M16/9XUyCz vsgdccBRhS21Unch/KHHrB8r30Mvsqvagr992Gd+4qL3Gtcg0shtXvLhPbfhI/m/fRjk E/WIn1qqQYTyBbdJ119YQpV5K5IaKjUQ4a7b9LE0dNEoJ8rGBJOSde1ikeN9aCY32Ixe mZ55RIH1xN3ZIxCFQz3pbFtTSxFJQ4S4bQmAXcgvN3F7XNpujH1h0RBdjGYJCE2Zr2cS VFB8N4zP5NK2I3CVz7Ia8d+0uMS0hpKU6f6Nxuulfs/JYLk/lUhkeOTdopiwCoLDZ0aL FC9w== X-Gm-Message-State: ACrzQf0bG+jwBUWtFqt8rkJXWLrZuzylB9M+qLsAV63MuE+F2gptLKen EDEGMLekkIi22XG8SiFcKkfrlA== X-Google-Smtp-Source: AMsMyM4NgqHNKtDV70DB1KFzuvl+0vpIsCAZUEzTVRJIZh7NwCXQJvet4SJZcrhTq2kgRZATZZMhOw== X-Received: by 2002:a05:6512:1694:b0:48a:9d45:763f with SMTP id bu20-20020a056512169400b0048a9d45763fmr11087362lfb.662.1666609948667; Mon, 24 Oct 2022 04:12:28 -0700 (PDT) Received: from fedora.. ([85.235.10.72]) by smtp.gmail.com with ESMTPSA id g22-20020a2eb5d6000000b0026de1bf528esm4821692ljn.119.2022.10.24.04.12.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:12:28 -0700 (PDT) From: Linus Walleij To: Mauro Carvalho Chehab , linux-media@vger.kernel.org Cc: Linus Walleij , Jonathan Corbet , Akinobu Mita Subject: [PATCH 2/3 v3] media: ov7670: Drop unused include Date: Mon, 24 Oct 2022 13:12:22 +0200 Message-Id: <20221024111223.7142-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024111223.7142-1-linus.walleij@linaro.org> References: <20221024111223.7142-1-linus.walleij@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The driver includes the legacy header but does not use any symbols from it. Drop the include. Cc: Jonathan Corbet Cc: Akinobu Mita Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - Rebase on v6.1-rc1 ChangeLog v1->v2: - Rebase on v6.0-rc1 --- drivers/media/i2c/ov7670.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c index 4b9b156b53c7..11d3bef65d43 100644 --- a/drivers/media/i2c/ov7670.c +++ b/drivers/media/i2c/ov7670.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include From patchwork Mon Oct 24 11:12:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13017129 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74E61ECAAA1 for ; Mon, 24 Oct 2022 11:12:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229934AbiJXLMv (ORCPT ); Mon, 24 Oct 2022 07:12:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229711AbiJXLMu (ORCPT ); Mon, 24 Oct 2022 07:12:50 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B5D655092 for ; Mon, 24 Oct 2022 04:12:33 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id g1so16068818lfu.12 for ; Mon, 24 Oct 2022 04:12:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/c1WaX3jQQyf7g4U4+fSAlZRXcbNscIMPZyOimv76+g=; b=JYEFaU0g147SWM4MdD7PgaXHggR0ic4tB+TsVvfhhdpllzDGfXDSWaG5OlGEtjEDIn CD/IpuQ3KB0iaHHYdX3TZ+rbh+jNuz2lv9DQT6LnzVHXmugqRumXSVMQQJDtRthCdLT5 HRQxBDQQTW/lHVXZ/KWvEvcSTHqnCj3+JJ7pyeFr+Sj+FZMXy55lJ7udzmXcSjvhQihz xKzeraKYoMjIXeDNX1r1CkcowJ/anO07Nm/2Lds/RTsfLBzBI690IaSVP5LjgsEFGfmd KlJsdN19/xY4TsBSVk1XTaW2LHz+Aqqf7dqaX9zzFRVOIbNF4KqcaPcET2IAVHHVuFp7 4JlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/c1WaX3jQQyf7g4U4+fSAlZRXcbNscIMPZyOimv76+g=; b=aEMglFq2RYHGYgyw92PueaHMHg/tZtmX4Zt6XFJclfpYHxl6Ly+bcsAcck1lBOUjoe Bj8vv1sjoVa0ygWuCz8pzcMtgKPAvQUlFuK82P3zaWhgGmFaSR4sY9/m8Aw9p3GGMq3j qAUj5WZjCJUrd0g1ZKTaZhz06zhkXclLN0Hreeba78GUU5HvwIIB7yc5LOn221ZknSSs sxlhzvM/BvCk75gucpdD28lbMW+wLwFDbusAl8ZQLZTMURgrFraGGoYISuTgnNb4ZE24 te419CdK37KRAhov4TSwg4rzO604pPY4bWj/nZKmw794pTiBYeIsMejZgFMX+E7QBM5o Wl9A== X-Gm-Message-State: ACrzQf0HY7gVpWLcORESf2c0w/I/71kZlKRAHdct54vH6k64UvpCvTpU L6PmrpNN9eMp9SQkirtJx6P1/kfR/A0PnA== X-Google-Smtp-Source: AMsMyM7eWtj1Lv7JwUM7VvX6m2p6+i1NZEUuHuM3YWQUw0feSsl864jM6y7ZtGbI6DYrSD7WfUq59g== X-Received: by 2002:a05:6512:3f89:b0:4a1:b468:1a7 with SMTP id x9-20020a0565123f8900b004a1b46801a7mr10961827lfa.341.1666609950174; Mon, 24 Oct 2022 04:12:30 -0700 (PDT) Received: from fedora.. ([85.235.10.72]) by smtp.gmail.com with ESMTPSA id g22-20020a2eb5d6000000b0026de1bf528esm4821692ljn.119.2022.10.24.04.12.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:12:29 -0700 (PDT) From: Linus Walleij To: Mauro Carvalho Chehab , linux-media@vger.kernel.org Cc: Linus Walleij , Kieran Bingham , Andrzej Hajda , Akinobu Mita Subject: [PATCH 3/3 v3] media: ov9650: Drop platform data code path Date: Mon, 24 Oct 2022 13:12:23 +0200 Message-Id: <20221024111223.7142-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024111223.7142-1-linus.walleij@linaro.org> References: <20221024111223.7142-1-linus.walleij@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Nothing in the kernel uses the platform data code path. Drop it, and drop the use of the old legacy API in the process. Cc: Kieran Bingham Cc: Andrzej Hajda Cc: Akinobu Mita Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - Rebase on v6.1-rc1 ChangeLog v1->v2: - Rebase on v6.0-rc1 --- drivers/media/i2c/ov9650.c | 49 ++------------------------------------ include/media/i2c/ov9650.h | 24 ------------------- 2 files changed, 2 insertions(+), 71 deletions(-) delete mode 100644 include/media/i2c/ov9650.h diff --git a/drivers/media/i2c/ov9650.c b/drivers/media/i2c/ov9650.c index 4d458993e6d6..7e7cb1e4520e 100644 --- a/drivers/media/i2c/ov9650.c +++ b/drivers/media/i2c/ov9650.c @@ -10,7 +10,6 @@ */ #include #include -#include #include #include #include @@ -30,7 +29,6 @@ #include #include #include -#include static int debug; module_param(debug, int, 0644); @@ -1402,38 +1400,6 @@ static const struct v4l2_subdev_ops ov965x_subdev_ops = { .video = &ov965x_video_ops, }; -/* - * Reset and power down GPIOs configuration - */ -static int ov965x_configure_gpios_pdata(struct ov965x *ov965x, - const struct ov9650_platform_data *pdata) -{ - int ret, i; - int gpios[NUM_GPIOS]; - struct device *dev = regmap_get_device(ov965x->regmap); - - gpios[GPIO_PWDN] = pdata->gpio_pwdn; - gpios[GPIO_RST] = pdata->gpio_reset; - - for (i = 0; i < ARRAY_SIZE(ov965x->gpios); i++) { - int gpio = gpios[i]; - - if (!gpio_is_valid(gpio)) - continue; - ret = devm_gpio_request_one(dev, gpio, - GPIOF_OUT_INIT_HIGH, "OV965X"); - if (ret < 0) - return ret; - v4l2_dbg(1, debug, &ov965x->sd, "set gpio %d to 1\n", gpio); - - gpio_set_value_cansleep(gpio, 1); - gpio_export(gpio, 0); - ov965x->gpios[i] = gpio_to_desc(gpio); - } - - return 0; -} - static int ov965x_configure_gpios(struct ov965x *ov965x) { struct device *dev = regmap_get_device(ov965x->regmap); @@ -1493,7 +1459,6 @@ static int ov965x_detect_sensor(struct v4l2_subdev *sd) static int ov965x_probe(struct i2c_client *client) { - const struct ov9650_platform_data *pdata = client->dev.platform_data; struct v4l2_subdev *sd; struct ov965x *ov965x; int ret; @@ -1513,17 +1478,7 @@ static int ov965x_probe(struct i2c_client *client) return PTR_ERR(ov965x->regmap); } - if (pdata) { - if (pdata->mclk_frequency == 0) { - dev_err(&client->dev, "MCLK frequency not specified\n"); - return -EINVAL; - } - ov965x->mclk_frequency = pdata->mclk_frequency; - - ret = ov965x_configure_gpios_pdata(ov965x, pdata); - if (ret < 0) - return ret; - } else if (dev_fwnode(&client->dev)) { + if (dev_fwnode(&client->dev)) { ov965x->clk = devm_clk_get(&client->dev, NULL); if (IS_ERR(ov965x->clk)) return PTR_ERR(ov965x->clk); @@ -1534,7 +1489,7 @@ static int ov965x_probe(struct i2c_client *client) return ret; } else { dev_err(&client->dev, - "Neither platform data nor device property specified\n"); + "No device properties specified\n"); return -EINVAL; } diff --git a/include/media/i2c/ov9650.h b/include/media/i2c/ov9650.h deleted file mode 100644 index 3ec7e06955b4..000000000000 --- a/include/media/i2c/ov9650.h +++ /dev/null @@ -1,24 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * OV9650/OV9652 camera sensors driver - * - * Copyright (C) 2013 Sylwester Nawrocki - */ -#ifndef OV9650_H_ -#define OV9650_H_ - -/** - * struct ov9650_platform_data - ov9650 driver platform data - * @mclk_frequency: the sensor's master clock frequency in Hz - * @gpio_pwdn: number of a GPIO connected to OV965X PWDN pin - * @gpio_reset: number of a GPIO connected to OV965X RESET pin - * - * If any of @gpio_pwdn or @gpio_reset are unused then they should be - * set to a negative value. @mclk_frequency must always be specified. - */ -struct ov9650_platform_data { - unsigned long mclk_frequency; - int gpio_pwdn; - int gpio_reset; -}; -#endif /* OV9650_H_ */