From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3682C433B4 for ; Thu, 8 Apr 2021 06:36:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BE2EE610A5 for ; Thu, 8 Apr 2021 06:36:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230061AbhDHGgf (ORCPT ); Thu, 8 Apr 2021 02:36:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:37738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229745AbhDHGge (ORCPT ); Thu, 8 Apr 2021 02:36:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 230BB6113E; Thu, 8 Apr 2021 06:36:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617863782; bh=d4bJMeSthNxp55dudnuK71kNjSClI8zdSk9EiYVKAaY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nTbfAuFM/rg4TQxV2/4IRTn5GspMUomlryuKbyH0G2kL2cfYbATZ492pBaAujihix hdLNLq70fkzUq2Dp3VdXLmjvzzxFZ4XPx2nHZADTh3mTB6FcicvQGwirE0e+2h+MyF Lmp3WjA6Ls7EmKsY1SZYHOrlchvdqvx/Z1EcpLY4= Date: Thu, 8 Apr 2021 08:36:20 +0200 From: Greg KH To: Min Li Cc: "derek.kiernan@xilinx.com" , "dragan.cvetic@xilinx.com" , "arnd@arndb.de" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH net-next v2 2/2] misc: Add Renesas Synchronization Management Unit (SMU) support Message-ID: References: <1617816815-3785-1-git-send-email-min.li.xe@renesas.com> <1617816815-3785-2-git-send-email-min.li.xe@renesas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 07, 2021 at 08:12:10PM +0000, Min Li wrote: > > > > Why not use the miscdev name field? > > > miscdev name field is just a char pointer and I need an static array to manipulate the name with index Why? > > So it's a parent? Why not make this a real platform_device pointer and not > > a device pointer? > > > > It is not parent and mfd field is the parent Then why are you saving it off? > > What operations? > > > > The MFD driver will create 2 devices, one is for phc driver and another one is this driver. > The lock is to make sure these 2 driver's operations are synchronized. Ok, that should be documented a bit, it wasn't obvious :) > > Index into what? > > > > index is passed by mfd driver and will be used as part of device name such as "rsmu0" So you can just look it up from the name? thanks, greg k-h