Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp9207612rwl; Wed, 11 Jan 2023 02:57:37 -0800 (PST) X-Google-Smtp-Source: AMrXdXvWoiPKbR+y2NIXdtVPP+Ufs1mLr7k9taxIIoJAVQ2XmlguPqSgWx4gwRSxoNUfA7ungZWn X-Received: by 2002:a05:6a21:6d86:b0:a3:e346:2548 with SMTP id wl6-20020a056a216d8600b000a3e3462548mr109724367pzb.15.1673434657340; Wed, 11 Jan 2023 02:57:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673434657; cv=none; d=google.com; s=arc-20160816; b=rMWgDxRnSyy82bOW6pUpE707GuGRl0Xg/dMHmYA54CxxzL8MdPJpLLobrFh158vyaA BszWxgsj1FoH4Pxv55ESk+i7lERocm0AiRf8TJ3V6luRBcdDJ2ZfQ6iUSEfC6M4YVJZe D+wElbEHpIVlC/GoiQCMZA7YWbRClGjcBO39a9YXxy9JQBHxlst6lE9Blv3EC6lijmyW PKkhIy8nkYD2Nj+YBGuGmC2Nu2hkdxxlAaP3qpjSXxGdcZjwfeaSIgISgberYlFeP5+c xS6jUp3y/AMCEIUxFLMi7jQO8Q+kaic55f+yuAo5oxXZdEwAxjkGdfox3BsBqL6ZlwS8 rUbA== 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=C7OtF6q7SOkScuCRPh4Pcf69+sm+wokanIiq8eplw64=; b=oPc9DVyKPweHIkssdBPWyyDS77xHBkeDP3jok7ahyBcZn8RJp1tuWvgO0/+TDm3UHR y42L3DpYtLmguMgL/9Cau84y22W7cf4hDx6z0knuy9/KJ052USUG18ZTSWFzm4fYPbhA qyu90B2m3uUu4Swsia3YbeSv6g0PWZY8fHXY7xexvYlo++hrW2sLRJLD4JHd1kYQ2l58 h4gKovn3UZIuhcR5CR2yk1j2IS5iotEzsXn4ZbKDlNaNj1mkIUPuHChR0yqTq+3GLZa3 Lc26EriZPDcNV1AhhH3ei9Tom/CZ628vq4BfCihIVZQGWcW3BqtzIDWm3crQupzO3Jog +u2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ax4cb6bR; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j62-20020a638b41000000b004b894ebdd37si337741pge.672.2023.01.11.02.57.30; Wed, 11 Jan 2023 02:57:37 -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=@linuxfoundation.org header.s=korg header.b=Ax4cb6bR; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238639AbjAKKtd (ORCPT + 53 others); Wed, 11 Jan 2023 05:49:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238741AbjAKKsw (ORCPT ); Wed, 11 Jan 2023 05:48:52 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 217946338 for ; Wed, 11 Jan 2023 02:48:43 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C25E061BE6 for ; Wed, 11 Jan 2023 10:48:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C8FCC433EF; Wed, 11 Jan 2023 10:48:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1673434122; bh=RuV9fBNZjHNiqza2g2xyDPkt7NXWbVDPBi8lN3ZAXsM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ax4cb6bRVXzvmjq8xKYdRvJzI0K84A1rTnNJ4JU6EGClIaOv/b1DNPVPdawrmy6C/ tWKFMargIDe93C4Anns+XaazdS7cEb3EjYc7nNSCHUJhmGZP+QswR4pqydzy1f73rB L31eTCTolCUoewnWUHAypM23wdwYArRu1d2nprvY= Date: Wed, 11 Jan 2023 11:48:38 +0100 From: Greg Kroah-Hartman To: Li Chen Cc: "rafael j. wysocki" , li chen , linux-kernel Subject: Re: [PATCH v2] debugfs: allow to use regmap for print regs Message-ID: References: <20230111072130.3885460-1-me@linux.beauty> <1859ff0ddb8.d9ed321d977156.553326609923116766@linux.beauty> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1859ff0ddb8.d9ed321d977156.553326609923116766@linux.beauty> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Wed, Jan 11, 2023 at 04:27:20PM +0800, Li Chen wrote: > Hi Greg, > ---- On Wed, 11 Jan 2023 15:42:44 +0800 Greg Kroah-Hartman wrote --- > > On Wed, Jan 11, 2023 at 03:21:29PM +0800, Li Chen wrote: > > > From: Li Chen lchen@ambarella.com> > > > > > > Currently, debugfs_regset32 only contains void __iomem *base, > > > and it is not friendly to regmap user. > > > > > > Let's add regmap to debugfs_regset32, and add debugfs_print_regmap_reg32 > > > to allow debugfs_regset32_show handle regmap. > > > > > > Signed-off-by: Li Chen lchen@ambarella.com> > > > > Do you have an actual in-kernel user for this new function? We can't > > accept new apis without users for obvious reasaons. > > Actually, both the old debugfs_print_regs32 and the new debugfs_regmap_print_regs32 > have only one user: debugfs_regset32_show located inside debugfs/file.c. Yes, but that function is used by lots of drivers in the kernel today, which is fine. > The difference is currently all users(device drivers) only use debugfs_regset32->base, > and none of them use debugfs_regset32->regmap, which is provided by this patch. > > I'm not sure whether it violates the kernel's "no user, no new function" ruler or not. Yes, you would have to have a user for this functionality for us to be able to take the change. > I use this regmap locally on our SoC driver, but it is still not ready to upstream, really sorry for it, > and it is not a good idea to change existing non-regmap users to regmap haha. > > If you think it does matter, please tell me and I will upload v3 with our SoC driver in the future. Please add it to your SoC driver patch series instead and I will be glad to review it at that point in time. But for now, this shouldn't be needed. thanks, greg k-h