Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp36161imp; Wed, 20 Feb 2019 18:35:29 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia5E4EwYuy5BA2VsbnCY0TRY1l7hTDa/2IvnJ0uY+DO/iLfrsiFS6iqXsfKvuCSspAoMMo7 X-Received: by 2002:a62:398d:: with SMTP id u13mr37757944pfj.32.1550716529088; Wed, 20 Feb 2019 18:35:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550716529; cv=none; d=google.com; s=arc-20160816; b=S3edOXkmDBtOAABv1RxLT3n/Lz5Jygqvm/EqHSXua2O38WknsRDsIa+f0mOwJfo5Fq ST2gSEJK5GubURW9dDN4WyaQa9HTb7JAMoGacIjbXrl/kfVFkWs5qInETL455T8saiR6 G8SNxsmAfq4u7BfWVNX1s0qpeGwI+ou4LGRQQlALbJ4mIrNGU5VGq/dZnmnlER54N1j2 FcUot57IrroLaFtZ7eKlJVxyl8Hoiyy7EkGf3YmYFMMC2vp/OoqtIVM1mfL05uh7VrBh /xyoe3UgB+AxK3t86GLx/Aomw0VI3y24+ssImyDyqxaZrV4sbJC2h2s4gkRPGVokwgH7 BryA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=pk+iqFlPTfMx0gksqw4Bv/w/1hyHBW/Q7XwTZUakHi8=; b=m8fBgt88Kt6PgfKnRAS1YLiBtB2jS2EI2oSmaTJEVgZVKCkE7WCQ9zGk1PEomicJay ScIeb4nYXmcnDsqzWnxsTxqFw497nUuv2aEkosZIqEF7EQTYKdWzOru53yfgwvzPdtmT sgQUnjm+YurRyqZ83THZnzLjBA8lk4LV+Qv/AiNtth1unq6XJio5jYJW8zjzHBQ2yRKf lgYoqyHHdiE6b6YyiXc9OoaTe19Jy9DKVSv4/4C4h6iolcNbdnK3Owao1EM1hnbTXwi8 H0nY75nZDbLPVq4NIaEZlQnMaloNy90hpJh/p9SpYviCnlPIzFEy+mVc2AiC/TTK1e/C Gz+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t1si2240460plo.371.2019.02.20.18.35.01; Wed, 20 Feb 2019 18:35:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726573AbfBUCe3 (ORCPT + 99 others); Wed, 20 Feb 2019 21:34:29 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:8186 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726009AbfBUCe2 (ORCPT ); Wed, 20 Feb 2019 21:34:28 -0500 X-UUID: af8846f3f5a7484e91719e6f27a82d5b-20190221 X-UUID: af8846f3f5a7484e91719e6f27a82d5b-20190221 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 33549891; Thu, 21 Feb 2019 10:34:15 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by mtkmbs03n2.mediatek.inc (172.21.101.182) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 21 Feb 2019 10:34:13 +0800 Received: from [10.16.6.141] (10.16.6.141) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 21 Feb 2019 10:34:11 +0800 Message-ID: <1550716451.23876.5.camel@mszsdaap41> Subject: Re: [PATCH V5 5/8] clk: mediatek: add MUX_GATE_FLAGS_2 From: mtk14994 To: Stephen Boyd CC: CK Hu , Michael Turquette , Ryder Lee , Philipp Zabel , , chunhui dai , David Airlie , Sean Wang , , , , "Daniel Vetter" , Matthias Brugger , "Colin Ian King" , , Date: Thu, 21 Feb 2019 10:34:11 +0800 In-Reply-To: <155069142918.77512.15726787055211591362@swboyd.mtv.corp.google.com> References: <20190220025357.7354-1-wangyan.wang@mediatek.com> <20190220025357.7354-6-wangyan.wang@mediatek.com> <155069142918.77512.15726787055211591362@swboyd.mtv.corp.google.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-SNTS-SMTP: 6B35865B27218DA5E0ACF1A9CEF1EFCB5B08DDBD136AEA6993247B1A9DBD11432000:8 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear Stephen, > + unsigned char mux_flags; > > Why isn't it an unsigned long? Isn't this supposed to match the > frameworks version of the clk flags? ----> it is unsigned char mux_flags ,becasuse struct clk_mux { .... .... u8 flags; .... } it is matched when use " mux->flags = mc->mux_flags;" Best Regards Wangyan On Wed, 2019-02-20 at 11:37 -0800, Stephen Boyd wrote: > Quoting wangyan wang (2019-02-19 18:53:54) > > From: chunhui dai > > > > Add MUX_GATE_FLAGS_2 for the clock which needs to set two falgs. > > s/falgs/flags/ > > > Such as some mux need to set the flags of "CLK_MUX_ROUND_CLOSEST". > > > > Signed-off-by: chunhui dai > > Signed-off-by: wangyan wang > > --- > > drivers/clk/mediatek/clk-mtk.c | 2 +- > > drivers/clk/mediatek/clk-mtk.h | 20 ++++++++++++++------ > > 2 files changed, 15 insertions(+), 7 deletions(-) > > > > diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c > > index 9c0ae4278a94..2ed996404804 100644 > > --- a/drivers/clk/mediatek/clk-mtk.c > > +++ b/drivers/clk/mediatek/clk-mtk.c > > @@ -167,7 +167,7 @@ struct clk *mtk_clk_register_composite(const struct mtk_composite *mc, > > mux->mask = BIT(mc->mux_width) - 1; > > mux->shift = mc->mux_shift; > > mux->lock = lock; > > - > > + mux->flags = mc->mux_flags; > > mux_hw = &mux->hw; > > mux_ops = &clk_mux_ops; > > > > diff --git a/drivers/clk/mediatek/clk-mtk.h b/drivers/clk/mediatek/clk-mtk.h > > index f83c2bbb677e..4b88d196d52f 100644 > > --- a/drivers/clk/mediatek/clk-mtk.h > > +++ b/drivers/clk/mediatek/clk-mtk.h > > @@ -81,15 +81,13 @@ struct mtk_composite { > > signed char divider_shift; > > signed char divider_width; > > > > + unsigned char mux_flags; > > Why isn't it an unsigned long? Isn't this supposed to match the > frameworks version of the clk flags? > > > _______________________________________________ > Linux-mediatek mailing list > Linux-mediatek@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-mediatek