Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp663571ybm; Thu, 28 May 2020 12:01:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxna3ghLXA0xFNwHlLu1HE2k94k6d4bfxZaA2ysSX6kC9mMLuHqziOKBsKCDVcqwg3ThFrN X-Received: by 2002:a05:6402:719:: with SMTP id w25mr4698175edx.179.1590692488364; Thu, 28 May 2020 12:01:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590692488; cv=none; d=google.com; s=arc-20160816; b=CaSZl+JHAgqTt6Gd8C70mLww6Dmr3ibpA/IMg+cGea7dOFoc64qwOoofbRTtvXXes1 0+LfwP2bXQnA53RABMi0zjGTTXa6S8BOxw2tdm8e9mHHlwr4Y/jVS5hRyvgxHUVvBtsQ uWtc/OayuMDKmssCYYZTLcy8hfyDSepWqjvBX0bLli01NLduKXArL/EzQndOUmzmC90T sVL4QkNPTaOhf0Csl9TJlzvQ/heT4QaeiQirJF8RLwUdsnz41oQaASi3Fx5Bha4/shdB P6gXC2sQXOp8afIH0LUP09AcmmmCKYvhcCdfWiQvzdqZRaxtmXW6ofIcAuy+hx98uzWy Vhaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:in-reply-to :subject:cc:to:from:user-agent:references:dkim-signature; bh=8zVkKrr6kkY53KW61WwI9h86+LLii2InI9vDH+nbUZs=; b=yW2v75aTyfiaH73KFqiTr5ZG4G006W4lGZcfVE5J7Q0iiMuGomcOmD8Yh2ThSSWauC ThrjQwOEWxKpcdHixP4F3Z+52y7LOna7VONGeuB2pvnNCWLQXTCMEleLCOjBU7njXjS2 HJ1pDsP8UFk1uJrGzJGhcfb7tI0V5hWiYu7qyZA/fTBT65ERo1JQ2C6LkBrEE1i0FEMP hl0dpq62zzlqvu2eoTVKIvbBHUoIujCzHHf8Yph2JQSuTvLmGJVYRns/j+pey1oPbD2s nhECYkP/+nmkIy510U2AcRa+SoXxL/bw23Si8hhtmbTIhEDzVcIO9f7UIFC6CvwFiWUb 9ejA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b="s4qyV/Hv"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sa22si4742223ejb.157.2020.05.28.12.01.04; Thu, 28 May 2020 12:01:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b="s4qyV/Hv"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406077AbgE1S6u (ORCPT + 99 others); Thu, 28 May 2020 14:58:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406065AbgE1S6t (ORCPT ); Thu, 28 May 2020 14:58:49 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E5A3C08C5C6 for ; Thu, 28 May 2020 11:58:48 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id r7so329990wro.1 for ; Thu, 28 May 2020 11:58:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=8zVkKrr6kkY53KW61WwI9h86+LLii2InI9vDH+nbUZs=; b=s4qyV/HveX+qC01bVYV7ugGlI6wbQKDlWM625heq9zN6Ye8rlqernbdmL5+kNW4oa2 2zFOhNxlFXiITPmvJ/nrwmb06zy4sbGzs5UB0tVv6wNtSD98WfAw0uU0oA646vb9tpXB 1fv7FrSgUmuUhZRv1n2onnuoBAXdZvYjpChjKhTrZWt65dKdfdS3S1l1c46BHCPLQHEb +4UvwwwQqOnos8sWvzNo35NW6cuOAH/vrKBnpXEatKuzC/TpTIPnxfyA4l3wfl1ioV5D KecSDXuA1M6HWiFJNGSOyHXc9XNpGIpqp5lL2WZ/5uF7OmTUmhezdIU1Z8LR86nbQ7Vc +suw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=8zVkKrr6kkY53KW61WwI9h86+LLii2InI9vDH+nbUZs=; b=cr9oIujGVmBNENVfhcWzEQHJIM/zeHYScMlIzoM5VM7v9v0bABSiCirEjz7ecA+GGB 5ylsx/JKAbPMcgH/3/ldm9ctq1J1ZM1nMLjW+BtstXaOhJdkjbEmuIPVa+BJ1s8A08z7 /1EAdx78CwYKp3LtAhIKnz8wOZEt+5OVM1CrLjvIWp0ufwZE1On5hFy31gsqPnULvZE7 +yUnIWIgFlZqE+PHqcjmN3KG3ciAEGSEedOy5obWBlEU35RSDJlkJZnjHU2IAwnGvmJr +gfw3okhsDGYF/pEkkFfgL5dyfo5MRdBtgOR8AT0BVK+E9eAnP3mPHyJ6zkWFL0/D6Zw RmtA== X-Gm-Message-State: AOAM5305RDM+QLIgeOw9tQp+I0beOmfL/xIiDC505x0iHV5ZEjPrrZqR t4lXaHDp7r92hSW920EZsUCi1g== X-Received: by 2002:adf:ef47:: with SMTP id c7mr5245616wrp.57.1590692326851; Thu, 28 May 2020 11:58:46 -0700 (PDT) Received: from localhost (cag06-3-82-243-161-21.fbx.proxad.net. [82.243.161.21]) by smtp.gmail.com with ESMTPSA id g82sm8074648wmf.1.2020.05.28.11.58.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2020 11:58:46 -0700 (PDT) References: <20200519170440.294601-1-jbrunet@baylibre.com> User-agent: mu4e 1.3.3; emacs 26.3 From: Jerome Brunet To: Martin Blumenstingl Cc: Stephen Boyd , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] clk: add api to get clk consummer from clk_hw In-reply-to: Date: Thu, 28 May 2020 20:58:45 +0200 Message-ID: <1j8shbkhsq.fsf@starbuckisacylon.baylibre.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 27 May 2020 at 22:07, Martin Blumenstingl wrote: > Hi Jerome, > > On Tue, May 19, 2020 at 7:09 PM Jerome Brunet wrote: > [...] >> + * Calls to this function must be balanced with calls clk_put() >> + */ >> +struct clk *clk_hw_get_clk(struct clk_hw *hw) > I haven't looked at it myself yet, but would it be hard to have a > devm_ variant of this function as well? Seems easy enough. Stephen is this OK with you ? I'm just wondering if this devm_ function should use the device pointer embedded in the clk_hw structure or have it as an argument ? The 1st option seems simpler but I'm not sure it is correct. Thoughts ? > a non-devm managed function would add boilerplate to the meson-mx-sdhc-mmc code > > also this may or may not simplify how to fetch the struct device > pointer for this use-case. > (that said, I only know about drivers for Amlogic related IP and there > the devm_ variant can be used, but I don't know about other potential > consumers of this new API) > > > Thank you! > Martin