From patchwork Tue Mar 8 12:55:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Palcu X-Patchwork-Id: 12773741 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 3AD9FC433EF for ; Tue, 8 Mar 2022 12:56:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346893AbiCHM5P (ORCPT ); Tue, 8 Mar 2022 07:57:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233421AbiCHM5P (ORCPT ); Tue, 8 Mar 2022 07:57:15 -0500 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130050.outbound.protection.outlook.com [40.107.13.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE31247541; Tue, 8 Mar 2022 04:56:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SzpCg4K563SctIwj3GB/yCjmDauAvhH9gsAkd3wP+Ws17pEEVFfrUTEFW/Gp+dWsUvqVIS2ehekCv64UUbhbUcKx/nA6ERLEoACZO8BvKNa8poRSEscUhRQfLDsC2K34efXTJF7AeQhvg/lB2faiDIAIFuzDIM14OpKbY4s73bDRe3BrzCjdo5bC9TYyjQFsJtiKabl6kwOeBnmjG/B5bI4rqjs0iwkaWlpMjM+Aod5DMcL94sZJWXsmcTOL5pSORe91hne79EdRQcjjdL7WvWE+mT6kZfYT72lmXHBMP9IG/9lL5qcVB/QtVJ01uO0JwYqTnf1ak1pr62AAmAMdRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GbCpnfzk/F872enxkGEhcaZfijUUnqIig0Nu87oDU4M=; b=kT5NPco9nt6xJjzz0BGUdAcskkpFT4Fa6M1abRAq3ETfl1C8VkskBJcJ/jiJHl6vjypiEbl/a8mXyBHM6dSDiMtjxaKIibfgYNohQci6iWWqnV+HJXaFduaOdEwcpj0iM2MwIQ47bAVQN/TRh9gncl7QXZ4RDCnvzs0MLWTbJydQMY5JcOmoqLXgEl9rV9ZSKpiaduKdZ3b/zBoNr3gxL51MqKPNpugRDIOCmSemKLZS8TEmfmJJ/iGIriWNLytR/xDgjPxFYH+wPHKVyqg8KYbiZe8tb1GPaiY2/RPVsvfKk0Q1HJe8X0Yseurzt1jzMF7GWGkyI1LSjS7leu6pQg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GbCpnfzk/F872enxkGEhcaZfijUUnqIig0Nu87oDU4M=; b=JJzarkYX00u+VzXkfVmlBqlRg3xOOVZ4MVWt53IAFieAvA2enwCJ8lBnXe6Mo4518zHbTJSghG0HeXFPE+F06KLYcjgurFW0gNm8XEsG11iTyT2xwsZ2zDMf1rsVbnRBkR6N3KWWgQYk/lcInShz7frKHG2Z4S9sVlSzOxeqi6A= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from VI1PR0402MB3902.eurprd04.prod.outlook.com (2603:10a6:803:22::27) by AM6PR0402MB3813.eurprd04.prod.outlook.com (2603:10a6:209:21::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.19; Tue, 8 Mar 2022 12:56:14 +0000 Received: from VI1PR0402MB3902.eurprd04.prod.outlook.com ([fe80::7075:9a92:d8b1:61cf]) by VI1PR0402MB3902.eurprd04.prod.outlook.com ([fe80::7075:9a92:d8b1:61cf%3]) with mapi id 15.20.5038.027; Tue, 8 Mar 2022 12:56:14 +0000 From: Laurentiu Palcu To: Jacopo Mondi , Kieran Bingham , Laurent Pinchart , =?utf-8?q?Nik?= =?utf-8?q?las_S=C3=B6derlund?= , Mauro Carvalho Chehab Cc: Laurentiu Palcu , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: i2c: rdacm2x: properly set subdev entity function Date: Tue, 8 Mar 2022 14:55:49 +0200 Message-Id: <20220308125549.9676-1-laurentiu.palcu@oss.nxp.com> X-Mailer: git-send-email 2.17.1 X-ClientProxiedBy: AM9P192CA0015.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:21d::20) To VI1PR0402MB3902.eurprd04.prod.outlook.com (2603:10a6:803:22::27) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 245efa32-7c6d-4047-2c2e-08da01030722 X-MS-TrafficTypeDiagnostic: AM6PR0402MB3813:EE_ X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ytvx41Hio3y0zaDSYKVEYYBPUMu1YfbKWcmASjLmJtlda9PD3VDJi/8+7bHSonO3LsUsA6j2krAeUIE4wzWV2e9qL5QB0khcicAWY+C1cEoM42ij0AQzkI6ciYELzFulXMD9HFkg2/jt0tv9VTN55St8Cq9aIM9aUKLim4ABc1yaEa5AUfCTku1APRGeQ65b9VMpLWmMJSxPZ7gw+nc+e54IVMkntUg0kywuIcMSBS9xAGKsOCuRxx10K5VKOoujtHoCRSBap1gRRND9OsllyAjAUC/5Ef+BxlG2NWCZB3PWpvqmuhhb8ZYr+8vmnlktN+fcgpjbr6EQuv2mlW0vpdq0xqTQW93uETY8hZ6Ayk9eNzamO0PyEb1dimUQYI9pjoSkOkbZ1u+rA46Ed6bTPRuPSzt5KeCpza7l+hfqe3iAC8obMDN3R+6dEbKbNhjBcSr1q2N704ee4O7X/OotsDX+Nr5pUU+KJZ/GzUZxlHCttg54a4Xerc18ITM8Elhm5D9Do6mm0G7Hen2wUIxYrxycnCBpfLLHPZlutLn91GgHP5SVzedWL6+sh0p+xLyZVwMMyiFhciXyi4agBScinBJKgBXi4bEw7PvnZ6yZDTsB5sGYpHaaBQQoM8cXBpohVVgAs/+Kk9g81XQm5p7RkmW8L6o0rcA9WegAm0khHVApNZkNNkMEBLbjZ0pZjXa7xoP6APwOFruTxjLXuMp5bg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR0402MB3902.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(2616005)(44832011)(316002)(110136005)(86362001)(2906002)(66556008)(66476007)(4326008)(1076003)(66946007)(5660300002)(8676002)(38350700002)(8936002)(38100700002)(6512007)(26005)(83380400001)(186003)(508600001)(6486002)(52116002)(6506007)(6666004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: X6oHxBQjmjFOh3+sAKlDPg2UoXNAy12+9M7mOW4gHp/2pxsgp9Yb7Yf3fWTdE6/cI+LbFGoVMcIqjCcB8QcsunohI5gwIfHi7DqHF4zL5RJ1ahK0/ZU7rn3lqnRqtwnqmZwdwYhGQFIBoUw5cN811i4T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o/29cFZHiWS05QHVIObNQjIkYIHGYmaYpvelFqez9SBRbSjStYYiICn7WxjLjRGB2Kw7yMO+8y6zyZJjLP6U/qBbjFQYVIl2+odOARUIFd0QPjl6494dJepVbWkqHK5XQhsk7ONwXvWGFNizezCixPgFH8heMZBTSkRBPpij2QIOlrMv0uwRXT8m0YrYjxNuo0/Rt4AvonIAGVuNcjr5jw41kL0AJBHFuEWM0BJJN4Fu+bwymPnjB/WYX9iLWOpjArjBuAEkFgehZFWpzFUtFfnK09+N/FIqXTsKfrnrYfWyBnzxvOIvb/GMl/juQhZKGrJsTyRJ08/Mn5+9f/xZqmg/vXt39v0e7pEydJXAxXhOi2vKrCSSIw3E751TyY/VXrwa9XnUK/QrDxuhDTyV92SOHYZ0cN807D3gQxJQZk= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 245efa32-7c6d-4047-2c2e-08da01030722 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3902.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2022 12:56:14.5212 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: CHMN4bbbiCEU9soogf1xkpw1vCMgYumUti8wfufv/DPygWysXi/qomweRm9i26Cv3UzwQoU0gVONUg1KM3S5+g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3813 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The subdevice entity function was left unset, which produces a warning when probing the device: mxc-md bus@58000000:camera: Entity type for entity rdacm20 19-0051 was not initialized! Also, set the entity flags to MEDIA_ENT_FL_DEFAULT instead of MEDIA_ENT_F_CAM_SENSOR which will be used for entity's function instead. Signed-off-by: Laurentiu Palcu --- Hi, Only tested the rdacm20 part but I believe rdacm21 should work as well. Cheers, laurentiu drivers/media/i2c/rdacm20.c | 3 ++- drivers/media/i2c/rdacm21.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/rdacm20.c b/drivers/media/i2c/rdacm20.c index 025a610de893..ea5b7d5151ee 100644 --- a/drivers/media/i2c/rdacm20.c +++ b/drivers/media/i2c/rdacm20.c @@ -611,7 +611,8 @@ static int rdacm20_probe(struct i2c_client *client) goto error_free_ctrls; dev->pad.flags = MEDIA_PAD_FL_SOURCE; - dev->sd.entity.flags |= MEDIA_ENT_F_CAM_SENSOR; + dev->sd.entity.flags |= MEDIA_ENT_FL_DEFAULT; + dev->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR; ret = media_entity_pads_init(&dev->sd.entity, 1, &dev->pad); if (ret < 0) goto error_free_ctrls; diff --git a/drivers/media/i2c/rdacm21.c b/drivers/media/i2c/rdacm21.c index 12ec5467ed1e..be89bd43e88b 100644 --- a/drivers/media/i2c/rdacm21.c +++ b/drivers/media/i2c/rdacm21.c @@ -583,7 +583,8 @@ static int rdacm21_probe(struct i2c_client *client) goto error_free_ctrls; dev->pad.flags = MEDIA_PAD_FL_SOURCE; - dev->sd.entity.flags |= MEDIA_ENT_F_CAM_SENSOR; + dev->sd.entity.flags |= MEDIA_ENT_FL_DEFAULT; + dev->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR; ret = media_entity_pads_init(&dev->sd.entity, 1, &dev->pad); if (ret < 0) goto error_free_ctrls;