From patchwork Wed May 25 19:06:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 12861610 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 48009C433EF for ; Wed, 25 May 2022 19:08:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344036AbiEYTIg (ORCPT ); Wed, 25 May 2022 15:08:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344233AbiEYTHp (ORCPT ); Wed, 25 May 2022 15:07:45 -0400 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::225]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DE9A12AA0; Wed, 25 May 2022 12:07:16 -0700 (PDT) Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id CD8961C0010; Wed, 25 May 2022 19:07:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1653505632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=K4O1seWjlvikm6kOmNm6JNLD+SkT59G+ZnD50K9yvvM=; b=EnUmrJ04mOqgrgiXWe7Ry8pSoOMF6WQOzDGfHs1ZM+egz3G0JD40EXNiT8jdKtQT7R1H2j Z5ABYpSqKs5yhQNgsF7E5CtPdfWFlRfBYkNNZ/aII3PyhulxR+ExYLzYWbMZvR0eJKUgct kr9h+L04HifxL7Odc7B9F7iV2R9/DzTe7geULUY2ubS0vEV6b/3GPNB7vg53ybxXtQjBpZ XVUajP8vk1RHf6YAEe0KTWV8rxf+BoPakN68HTcQ7JVPvdB6tYU3CRreUZEUgXLoaMWQ50 D18eDsGhh2pgs/8Iuj1tURcQWLiRKMz3FeDzLwqIjpHdSA+S8t6/FspXf7w3+w== From: Paul Kocialkowski To: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Cc: Yong Deng , Paul Kocialkowski , Mauro Carvalho Chehab , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Laurent Pinchart , Maxime Ripard , Thomas Petazzoni Subject: [PATCH v5 39/44] media: sun6i-csi: Cleanup headers and includes, update copyright lines Date: Wed, 25 May 2022 21:06:12 +0200 Message-Id: <20220525190617.696344-40-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220525190617.696344-1-paul.kocialkowski@bootlin.com> References: <20220525190617.696344-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Cleanup includes, update copyright lines and some cosmetic changes. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec --- .../platform/sunxi/sun6i-csi/sun6i_csi.c | 15 +++++-------- .../platform/sunxi/sun6i-csi/sun6i_csi.h | 10 ++++----- .../sunxi/sun6i-csi/sun6i_csi_capture.c | 4 ++-- .../sunxi/sun6i-csi/sun6i_csi_capture.h | 22 ++++++++++++++----- .../platform/sunxi/sun6i-csi/sun6i_csi_reg.h | 9 ++++---- 5 files changed, 34 insertions(+), 26 deletions(-) diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c index 75d9f7edf828..eaf62cab0b64 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c @@ -1,18 +1,14 @@ // SPDX-License-Identifier: GPL-2.0+ /* * Copyright (c) 2011-2018 Magewell Electronics Co., Ltd. (Nanjing) - * All rights reserved. * Author: Yong Deng + * Copyright 2021-2022 Bootlin + * Author: Paul Kocialkowski */ #include -#include -#include #include -#include #include -#include -#include #include #include #include @@ -20,12 +16,12 @@ #include #include #include -#include -#include -#include +#include #include #include "sun6i_csi.h" +#include "sun6i_csi_bridge.h" +#include "sun6i_csi_capture.h" #include "sun6i_csi_reg.h" /* Media */ @@ -375,4 +371,5 @@ module_platform_driver(sun6i_csi_platform_driver); MODULE_DESCRIPTION("Allwinner A31 Camera Sensor Interface driver"); MODULE_AUTHOR("Yong Deng "); +MODULE_AUTHOR("Paul Kocialkowski "); MODULE_LICENSE("GPL"); diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h index e3f9c49bb829..fd6e98b66f12 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h @@ -1,15 +1,15 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* * Copyright (c) 2011-2018 Magewell Electronics Co., Ltd. (Nanjing) - * All rights reserved. * Author: Yong Deng + * Copyright 2021-2022 Bootlin + * Author: Paul Kocialkowski */ -#ifndef __SUN6I_CSI_H__ -#define __SUN6I_CSI_H__ +#ifndef _SUN6I_CSI_H_ +#define _SUN6I_CSI_H_ #include -#include #include #include "sun6i_csi_bridge.h" @@ -49,4 +49,4 @@ struct sun6i_csi_variant { unsigned long clock_mod_rate; }; -#endif /* __SUN6I_CSI_H__ */ +#endif diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c index e5ebe7a50c6f..36ddc190a919 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c @@ -1,13 +1,13 @@ // SPDX-License-Identifier: GPL-2.0+ /* * Copyright (c) 2011-2018 Magewell Electronics Co., Ltd. (Nanjing) - * All rights reserved. * Author: Yong Deng + * Copyright 2021-2022 Bootlin + * Author: Paul Kocialkowski */ #include #include - #include #include #include diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.h b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.h index 59c57bcefeec..ceceb030aef6 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.h +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.h @@ -1,15 +1,15 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* * Copyright (c) 2011-2018 Magewell Electronics Co., Ltd. (Nanjing) - * All rights reserved. * Author: Yong Deng + * Copyright 2021-2022 Bootlin + * Author: Paul Kocialkowski */ -#ifndef __SUN6I_CAPTURE_H__ -#define __SUN6I_CAPTURE_H__ +#ifndef _SUN6I_CAPTURE_H_ +#define _SUN6I_CAPTURE_H_ -#include -#include +#include #define SUN6I_CSI_CAPTURE_NAME "sun6i-csi-capture" @@ -57,21 +57,31 @@ struct sun6i_csi_capture { struct v4l2_format format; }; +/* Helpers */ + void sun6i_csi_capture_dimensions(struct sun6i_csi_device *csi_dev, unsigned int *width, unsigned int *height); void sun6i_csi_capture_format(struct sun6i_csi_device *csi_dev, u32 *pixelformat, u32 *field); +/* Format */ + const struct sun6i_csi_capture_format *sun6i_csi_capture_format_find(u32 pixelformat); +/* Capture */ + void sun6i_csi_capture_configure(struct sun6i_csi_device *csi_dev); void sun6i_csi_capture_state_update(struct sun6i_csi_device *csi_dev); +/* State */ + void sun6i_csi_capture_sync(struct sun6i_csi_device *csi_dev); void sun6i_csi_capture_frame_done(struct sun6i_csi_device *csi_dev); +/* Capture */ + int sun6i_csi_capture_setup(struct sun6i_csi_device *csi_dev); void sun6i_csi_capture_cleanup(struct sun6i_csi_device *csi_dev); -#endif /* __SUN6I_CAPTURE_H__ */ +#endif diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_reg.h b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_reg.h index 1e4a07f26d1d..e01c5b9c2d60 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_reg.h +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_reg.h @@ -1,12 +1,13 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* * Copyright (c) 2011-2018 Magewell Electronics Co., Ltd. (Nanjing) - * All rights reserved. * Author: Yong Deng + * Copyright 2021-2022 Bootlin + * Author: Paul Kocialkowski */ -#ifndef __SUN6I_CSI_REG_H__ -#define __SUN6I_CSI_REG_H__ +#ifndef _SUN6I_CSI_REG_H_ +#define _SUN6I_CSI_REG_H_ #include @@ -180,4 +181,4 @@ #define SUN6I_CSI_CH_FIFO_STAT_REG 0x98 #define SUN6I_CSI_CH_PCLK_STAT_REG 0x9c -#endif /* __SUN6I_CSI_REG_H__ */ +#endif