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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03F94C43217 for ; Mon, 8 Nov 2021 00:22:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D149960FE8 for ; Mon, 8 Nov 2021 00:22:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236797AbhKHAY4 (ORCPT ); Sun, 7 Nov 2021 19:24:56 -0500 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:34063 "EHLO new2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234291AbhKHAYy (ORCPT ); Sun, 7 Nov 2021 19:24:54 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 08DD95803EE; Sun, 7 Nov 2021 19:22:10 -0500 (EST) Received: from imap43 ([10.202.2.93]) by compute4.internal (MEProxy); Sun, 07 Nov 2021 19:22:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type; s=fm1; bh=G+UTj3AnYA8ZP4iI6M9Sj8AQF+R2TPP HefdgO8p+64c=; b=DH5pY0FSsMwGpnEmhsJQjDs5+cmjOwQWLhAQvbBGLs0a0cv mvH/jrNMkqIBGr63FcxWAukxOx7Y1xbd9WVbJMSTmRiE/jtJQrHUKFdy6F5Z5oLp EYnVAlFpySFfCFHWOr1EvvSYap8eiM1WalaF9SOJ+41uxPG7ZCCNhSNbwnXc4SOX YZbOw4fCuxEulH6S5TugJUP6T3rdbd/PNgF5C0IWPmiYh+O3DTiqH1+N4MdJfmlU vUBRyjGmC284GFHpWuewHG0BpEV+dCgndjYgwv0DlLqWML/lpxGVWTApmkYTI/GH czRsGFmdIa7KkHqion/z3vE2qaAU4LHjngwdOeA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=G+UTj3 AnYA8ZP4iI6M9Sj8AQF+R2TPPHefdgO8p+64c=; b=a0M181+Us4nINoGWsTOddb Nr2mH2QxHIKkVlSS2+Ub0kKadvvT+Z8DhMtiZ10GBqDDhSKML8Kr2Uh8/SqGkYY9 Q5dNHPksEGldk3TLhhAJM/BH1ma8Jmj87/WcfrzoqHT8dHRcDR0Z8d6S7u8/eixO 4Ut7AaJwE7nr2kT0lYGX11ukx7ogp9zvs3+8b3tya3hcAKNO7hBxac4CcO1FqZKD PEiDikdX0z4Qdth70qXI6eszhy2jyZ7aJl/yi08W5SNjzA0xmx7rvok/5HGcDIfO ua6UJo3HCrF1QLCq93/wSyrlrGYS3INatr3oXrC2QwAOBjgxQHf4cv6cP9dIplEQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddugdduiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedftehnughr vgifucflvghffhgvrhihfdcuoegrnhgurhgvfiesrghjrdhiugdrrghuqeenucggtffrrg htthgvrhhnpeehhfefkefgkeduveehffehieehudejfeejveejfedugfefuedtuedvhefh veeuffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grnhgurhgvfiesrghjrdhiugdrrghu X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id E931FAC0DD1; Sun, 7 Nov 2021 19:22:08 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-1369-gd055fb5e7c-fm-20211018.002-gd055fb5e Mime-Version: 1.0 Message-Id: In-Reply-To: References: <20210922103116.30652-1-chin-ting_kuo@aspeedtech.com> <20210922103116.30652-5-chin-ting_kuo@aspeedtech.com> <5a235916-f250-48ac-b931-6ec2c5c2ea5d@www.fastmail.com> Date: Mon, 08 Nov 2021 10:51:48 +1030 From: "Andrew Jeffery" To: "Chin-Ting Kuo" , "Rob Herring" , "Joel Stanley" , "Ulf Hansson" Cc: BMC-SW , "Steven Lee" , "Michael Turquette" , "Stephen Boyd" , "Adrian Hunter" , "linux-aspeed@lists.ozlabs.org" , "openbmc@lists.ozlabs.org" , linux-mmc , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-clk@vger.kernel.org" Subject: Re: [PATCH 04/10] mmc: Add invert flag for clock phase signedness Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 6 Nov 2021, at 20:32, Chin-Ting Kuo wrote: > Hi Andrew, >>> > - rc = device_property_read_u32_array(dev, prop, degrees, 2); >> > + rc = device_property_read_u32_array(dev, prop, degrees, 4); >> > phase->valid = !rc; >> > if (phase->valid) { >> > - phase->in_deg = degrees[0]; >> > - phase->out_deg = degrees[1]; >> > + phase->inv_in_deg = degrees[0] ? true : false; >> > + phase->in_deg = degrees[1]; >> > + phase->inv_out_deg = degrees[2] ? true : false; >> > + phase->out_deg = degrees[3]; >> >> This fundamentally breaks any in-tree users. We can't do this. >> >> In terms of the binding, if negative phase values are something we must do, >> we can just extend the value range to include [-359, -1] right? > > Yes, agree it and I tried it before. But, it seems that the device tree > doesn't support > negative value with "-" prefixed and there is no device tree related > API used to get > the negative value from .dts. Thus, I tried to add an additional flag > to present > negative value. > Hmm. Still, I don't think we can break the binding this way. Rob, Ulf, Adrian: What are your thoughts on handling phase offsets in [-360, 360] in the binding? Do we append the flag field? Add a separate property? I don't think interleaving the flags is desirable, though interested in your thoughts. Andrew 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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 187B9C433F5 for ; Mon, 8 Nov 2021 00:22:57 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8910C60187 for ; Mon, 8 Nov 2021 00:22:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8910C60187 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aj.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HnWzL5zD5z2xtP for ; Mon, 8 Nov 2021 11:22:54 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.a=rsa-sha256 header.s=fm1 header.b=DH5pY0FS; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=a0M181+U; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=aj.id.au (client-ip=66.111.4.224; helo=new2-smtp.messagingengine.com; envelope-from=andrew@aj.id.au; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.a=rsa-sha256 header.s=fm1 header.b=DH5pY0FS; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=a0M181+U; dkim-atps=neutral Received: from new2-smtp.messagingengine.com (new2-smtp.messagingengine.com [66.111.4.224]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HnWyX17FVz2xtP; Mon, 8 Nov 2021 11:22:12 +1100 (AEDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 08DD95803EE; Sun, 7 Nov 2021 19:22:10 -0500 (EST) Received: from imap43 ([10.202.2.93]) by compute4.internal (MEProxy); Sun, 07 Nov 2021 19:22:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type; s=fm1; bh=G+UTj3AnYA8ZP4iI6M9Sj8AQF+R2TPP HefdgO8p+64c=; b=DH5pY0FSsMwGpnEmhsJQjDs5+cmjOwQWLhAQvbBGLs0a0cv mvH/jrNMkqIBGr63FcxWAukxOx7Y1xbd9WVbJMSTmRiE/jtJQrHUKFdy6F5Z5oLp EYnVAlFpySFfCFHWOr1EvvSYap8eiM1WalaF9SOJ+41uxPG7ZCCNhSNbwnXc4SOX YZbOw4fCuxEulH6S5TugJUP6T3rdbd/PNgF5C0IWPmiYh+O3DTiqH1+N4MdJfmlU vUBRyjGmC284GFHpWuewHG0BpEV+dCgndjYgwv0DlLqWML/lpxGVWTApmkYTI/GH czRsGFmdIa7KkHqion/z3vE2qaAU4LHjngwdOeA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=G+UTj3 AnYA8ZP4iI6M9Sj8AQF+R2TPPHefdgO8p+64c=; b=a0M181+Us4nINoGWsTOddb Nr2mH2QxHIKkVlSS2+Ub0kKadvvT+Z8DhMtiZ10GBqDDhSKML8Kr2Uh8/SqGkYY9 Q5dNHPksEGldk3TLhhAJM/BH1ma8Jmj87/WcfrzoqHT8dHRcDR0Z8d6S7u8/eixO 4Ut7AaJwE7nr2kT0lYGX11ukx7ogp9zvs3+8b3tya3hcAKNO7hBxac4CcO1FqZKD PEiDikdX0z4Qdth70qXI6eszhy2jyZ7aJl/yi08W5SNjzA0xmx7rvok/5HGcDIfO ua6UJo3HCrF1QLCq93/wSyrlrGYS3INatr3oXrC2QwAOBjgxQHf4cv6cP9dIplEQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddugdduiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedftehnughr vgifucflvghffhgvrhihfdcuoegrnhgurhgvfiesrghjrdhiugdrrghuqeenucggtffrrg htthgvrhhnpeehhfefkefgkeduveehffehieehudejfeejveejfedugfefuedtuedvhefh veeuffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grnhgurhgvfiesrghjrdhiugdrrghu X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id E931FAC0DD1; Sun, 7 Nov 2021 19:22:08 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-1369-gd055fb5e7c-fm-20211018.002-gd055fb5e Mime-Version: 1.0 Message-Id: In-Reply-To: References: <20210922103116.30652-1-chin-ting_kuo@aspeedtech.com> <20210922103116.30652-5-chin-ting_kuo@aspeedtech.com> <5a235916-f250-48ac-b931-6ec2c5c2ea5d@www.fastmail.com> Date: Mon, 08 Nov 2021 10:51:48 +1030 From: "Andrew Jeffery" To: "Chin-Ting Kuo" , "Rob Herring" , "Joel Stanley" , "Ulf Hansson" Subject: Re: [PATCH 04/10] mmc: Add invert flag for clock phase signedness Content-Type: text/plain X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: BMC-SW , "linux-clk@vger.kernel.org" , "linux-aspeed@lists.ozlabs.org" , "devicetree@vger.kernel.org" , Stephen Boyd , linux-mmc , Michael Turquette , Steven Lee , Adrian Hunter , "linux-kernel@vger.kernel.org" , "openbmc@lists.ozlabs.org" , "linux-arm-kernel@lists.infradead.org" Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" On Sat, 6 Nov 2021, at 20:32, Chin-Ting Kuo wrote: > Hi Andrew, >>> > - rc = device_property_read_u32_array(dev, prop, degrees, 2); >> > + rc = device_property_read_u32_array(dev, prop, degrees, 4); >> > phase->valid = !rc; >> > if (phase->valid) { >> > - phase->in_deg = degrees[0]; >> > - phase->out_deg = degrees[1]; >> > + phase->inv_in_deg = degrees[0] ? true : false; >> > + phase->in_deg = degrees[1]; >> > + phase->inv_out_deg = degrees[2] ? true : false; >> > + phase->out_deg = degrees[3]; >> >> This fundamentally breaks any in-tree users. We can't do this. >> >> In terms of the binding, if negative phase values are something we must do, >> we can just extend the value range to include [-359, -1] right? > > Yes, agree it and I tried it before. But, it seems that the device tree > doesn't support > negative value with "-" prefixed and there is no device tree related > API used to get > the negative value from .dts. Thus, I tried to add an additional flag > to present > negative value. > Hmm. Still, I don't think we can break the binding this way. Rob, Ulf, Adrian: What are your thoughts on handling phase offsets in [-360, 360] in the binding? Do we append the flag field? Add a separate property? I don't think interleaving the flags is desirable, though interested in your thoughts. Andrew 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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3111C433EF for ; Mon, 8 Nov 2021 00:23:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 980A46139E for ; Mon, 8 Nov 2021 00:23:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 980A46139E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aj.id.au Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:Cc:To:From:Date:References: In-Reply-To:Message-Id:Mime-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tfuRwMzipa56UIkR5NQ11JCb2Mml6cI5OlJVikqRKzc=; b=DyuS1BHKqfGgai 7d9Ithl3KEeAcXekrHEnUwOEmLkCog0Khl0mwc5spyBzRlTNjaIqkefDfQEfnd2LoDt5ONNbdK/0n Luhqdk/QnF7V/xbGxjxn2xZkcFZ22hz4NXfejekn7nTDtbYa/OWgExxKiz9kt59HRirrdSySdjHz8 C9gRRj+kxsf3m7Z1iMORYmwaqoSuOdFIAHIkH78S9WnIejdlAmW5lrqh7JlorcpMoI6Gj6SjWpPa5 pxRmkB0GokpOVSltsD9Rg2H4sieXS6gz5YyrBQddaCOgE/ung8vVeMgyZUpfLE1sTWDfVz8woJ/rw 7fHG1SaTa5BhSkG6FWnw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mjsQQ-00F5jT-Jo; Mon, 08 Nov 2021 00:22:14 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mjsQM-00F5j3-Rj for linux-arm-kernel@lists.infradead.org; Mon, 08 Nov 2021 00:22:12 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 08DD95803EE; Sun, 7 Nov 2021 19:22:10 -0500 (EST) Received: from imap43 ([10.202.2.93]) by compute4.internal (MEProxy); Sun, 07 Nov 2021 19:22:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type; s=fm1; bh=G+UTj3AnYA8ZP4iI6M9Sj8AQF+R2TPP HefdgO8p+64c=; b=DH5pY0FSsMwGpnEmhsJQjDs5+cmjOwQWLhAQvbBGLs0a0cv mvH/jrNMkqIBGr63FcxWAukxOx7Y1xbd9WVbJMSTmRiE/jtJQrHUKFdy6F5Z5oLp EYnVAlFpySFfCFHWOr1EvvSYap8eiM1WalaF9SOJ+41uxPG7ZCCNhSNbwnXc4SOX YZbOw4fCuxEulH6S5TugJUP6T3rdbd/PNgF5C0IWPmiYh+O3DTiqH1+N4MdJfmlU vUBRyjGmC284GFHpWuewHG0BpEV+dCgndjYgwv0DlLqWML/lpxGVWTApmkYTI/GH czRsGFmdIa7KkHqion/z3vE2qaAU4LHjngwdOeA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=G+UTj3 AnYA8ZP4iI6M9Sj8AQF+R2TPPHefdgO8p+64c=; b=a0M181+Us4nINoGWsTOddb Nr2mH2QxHIKkVlSS2+Ub0kKadvvT+Z8DhMtiZ10GBqDDhSKML8Kr2Uh8/SqGkYY9 Q5dNHPksEGldk3TLhhAJM/BH1ma8Jmj87/WcfrzoqHT8dHRcDR0Z8d6S7u8/eixO 4Ut7AaJwE7nr2kT0lYGX11ukx7ogp9zvs3+8b3tya3hcAKNO7hBxac4CcO1FqZKD PEiDikdX0z4Qdth70qXI6eszhy2jyZ7aJl/yi08W5SNjzA0xmx7rvok/5HGcDIfO ua6UJo3HCrF1QLCq93/wSyrlrGYS3INatr3oXrC2QwAOBjgxQHf4cv6cP9dIplEQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddugdduiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedftehnughr vgifucflvghffhgvrhihfdcuoegrnhgurhgvfiesrghjrdhiugdrrghuqeenucggtffrrg htthgvrhhnpeehhfefkefgkeduveehffehieehudejfeejveejfedugfefuedtuedvhefh veeuffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grnhgurhgvfiesrghjrdhiugdrrghu X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id E931FAC0DD1; Sun, 7 Nov 2021 19:22:08 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-1369-gd055fb5e7c-fm-20211018.002-gd055fb5e Mime-Version: 1.0 Message-Id: In-Reply-To: References: <20210922103116.30652-1-chin-ting_kuo@aspeedtech.com> <20210922103116.30652-5-chin-ting_kuo@aspeedtech.com> <5a235916-f250-48ac-b931-6ec2c5c2ea5d@www.fastmail.com> Date: Mon, 08 Nov 2021 10:51:48 +1030 From: "Andrew Jeffery" To: "Chin-Ting Kuo" , "Rob Herring" , "Joel Stanley" , "Ulf Hansson" Cc: BMC-SW , "Steven Lee" , "Michael Turquette" , "Stephen Boyd" , "Adrian Hunter" , "linux-aspeed@lists.ozlabs.org" , "openbmc@lists.ozlabs.org" , linux-mmc , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-clk@vger.kernel.org" Subject: Re: [PATCH 04/10] mmc: Add invert flag for clock phase signedness X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211107_162211_080264_721A4A8F X-CRM114-Status: GOOD ( 13.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, 6 Nov 2021, at 20:32, Chin-Ting Kuo wrote: > Hi Andrew, >>> > - rc = device_property_read_u32_array(dev, prop, degrees, 2); >> > + rc = device_property_read_u32_array(dev, prop, degrees, 4); >> > phase->valid = !rc; >> > if (phase->valid) { >> > - phase->in_deg = degrees[0]; >> > - phase->out_deg = degrees[1]; >> > + phase->inv_in_deg = degrees[0] ? true : false; >> > + phase->in_deg = degrees[1]; >> > + phase->inv_out_deg = degrees[2] ? true : false; >> > + phase->out_deg = degrees[3]; >> >> This fundamentally breaks any in-tree users. We can't do this. >> >> In terms of the binding, if negative phase values are something we must do, >> we can just extend the value range to include [-359, -1] right? > > Yes, agree it and I tried it before. But, it seems that the device tree > doesn't support > negative value with "-" prefixed and there is no device tree related > API used to get > the negative value from .dts. Thus, I tried to add an additional flag > to present > negative value. > Hmm. Still, I don't think we can break the binding this way. Rob, Ulf, Adrian: What are your thoughts on handling phase offsets in [-360, 360] in the binding? Do we append the flag field? Add a separate property? I don't think interleaving the flags is desirable, though interested in your thoughts. Andrew _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel