Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp208756pxf; Wed, 17 Mar 2021 03:25:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxou52Dl+UTrZMEyh0EdsLQmbX1CTnh9ZLw4J2h/N+50ZY4YruCDpkzVqWA9FrlnTrUYAwG X-Received: by 2002:a17:906:6a06:: with SMTP id o6mr33647379ejr.306.1615976709628; Wed, 17 Mar 2021 03:25:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615976709; cv=none; d=google.com; s=arc-20160816; b=baybs3kBEpU/MVjpU6CRw0BNAKJN3X59j2KdonGI1M4JbSgA9aKK7SweUz0/+nUrR2 GJgCPpniA3KFsPkSX39rI05OWxSJiZKFrdQTf3o6fdYlkFGWIMOGLby6s+w/bIkL72C9 vHuUeCFCutvcincN6HYSy+Fs5ipjNFlmYwJDBIYZoggNGGZ7/7YeXy0+DX1gUXDfWjog coRaM5W2odpGpyK8bU2TqB+Gj5SqQr0ttK3hlPmXsYXXski/IvyAipN5u0LI3fUWwIxM 9vQKPCgWjV/NQCzeO4mPjekJ1UVXn4e3CKMEdWANQ12A60ic514O0KFsdtp+zn24tTqh rnPg== 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=XBSIwcCnIj5O/X6eb93WBzEl38Vm6VZ2XigeQPtdNNg=; b=QLcmJ14/u3ONWYzudJT2ERHGDAqk37ci37hTqO5bsIheEbivwMgYV1JaG8TmxNADff gftprWWIpc2WY9dp9i5wg4EknzNMk3PKXRnSnl/pM3WjI5AqkHiM3CaZUQAx24LgjOdZ Veuc+zvgWHOC0QGuuV+irRP6PKqBdSvqbI4t6XzxxDmtgXbkSdmn5vkYozZF8utk4MZ+ o7CyWFW4vdvi3scvjxrrciuhlWP1tWNJRiUWAoIj3R30yH0ba7096WOM4ZWz1CNK/LfR QlbGiC6iGt1VGRVxKca4vG2N31O+07PcJkV6GxVlVEUR4+ZqJY2R7HJ/6DNZwEWhFEyf kF0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uXWROD1l; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lz19si3909880ejb.246.2021.03.17.03.24.46; Wed, 17 Mar 2021 03:25:09 -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=@kernel.org header.s=k20201202 header.b=uXWROD1l; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229809AbhCQKXC (ORCPT + 99 others); Wed, 17 Mar 2021 06:23:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:35304 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229772AbhCQKWx (ORCPT ); Wed, 17 Mar 2021 06:22:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0D3F064EE1; Wed, 17 Mar 2021 10:22:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615976572; bh=desTsx3WQtjTaVBjhTB+jOTKBQ4fVjhRjO2BfJzcTvw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uXWROD1l0QOnrXuCYjcLc4/v2MYTS0MwDMSd1ekyiUJ89MDjNelAY0o5t77I0zkam CLm01YdIrPgKjQzcfcCcPpRQZzm9ZIO2ywGBPKv8k+2maxCepIZFNRkqCxszU5JRnH OPM7O9/qIjOqaGzm2SKAPl5eRnVt/ziIU//lRqzH+wfmJhT4ZAx6PZPQ5EVX5k55ss sZnVQKwsIqWKvBu+nDrHJqLE2806MBQ1UZTBeWrSpFng878P0gmi2BE+HvInRYE9AP 4MpaCOoDj6Wvj1lJW+D3HgKBVrNgfVmlhWuZUWnG96a7R77FB+JzZfk1wDuSXd/sq7 XakProKWsCPUQ== Date: Wed, 17 Mar 2021 15:52:49 +0530 From: Vinod Koul To: Liu Ying , Kishon Vijay Abraham I Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, kishon@ti.com, robh+dt@kernel.org, a.hajda@samsung.com, narmstrong@baylibre.com, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@siol.net, airlied@linux.ie, daniel@ffwll.ch, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, agx@sigxcpu.org, robert.chiras@nxp.com, martin.kepplinger@puri.sm, robert.foss@linaro.org Subject: Re: [PATCH v4 2/5] phy: Add LVDS configuration options Message-ID: References: <1615175541-29009-1-git-send-email-victor.liu@nxp.com> <1615175541-29009-3-git-send-email-victor.liu@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1615175541-29009-3-git-send-email-victor.liu@nxp.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08-03-21, 11:52, Liu Ying wrote: > This patch allows LVDS PHYs to be configured through > the generic functions and through a custom structure > added to the generic union. > > The parameters added here are based on common LVDS PHY > implementation practices. The set of parameters > should cover all potential users. > > Cc: Kishon Vijay Abraham I > Cc: Vinod Koul > Cc: NXP Linux Team > Reviewed-by: Robert Foss > Signed-off-by: Liu Ying > --- > v3->v4: > * Add Robert's R-b tag. > > v2->v3: > * No change. > > v1->v2: > * No change. > > include/linux/phy/phy-lvds.h | 48 ++++++++++++++++++++++++++++++++++++++++++++ > include/linux/phy/phy.h | 4 ++++ > 2 files changed, 52 insertions(+) > create mode 100644 include/linux/phy/phy-lvds.h > > diff --git a/include/linux/phy/phy-lvds.h b/include/linux/phy/phy-lvds.h > new file mode 100644 > index 00000000..1b5b9d6 > --- /dev/null > +++ b/include/linux/phy/phy-lvds.h > @@ -0,0 +1,48 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * Copyright 2020 NXP > + */ > + > +#ifndef __PHY_LVDS_H_ > +#define __PHY_LVDS_H_ > + > +/** > + * struct phy_configure_opts_lvds - LVDS configuration set > + * > + * This structure is used to represent the configuration state of a > + * LVDS phy. > + */ > +struct phy_configure_opts_lvds { > + /** > + * @bits_per_lane_and_dclk_cycle: > + * > + * Number of bits per data lane and differential clock cycle. > + */ Can we have these in kernel-doc style please, similar to style in linux/phy/phy.h > + unsigned int bits_per_lane_and_dclk_cycle; > + > + /** > + * @differential_clk_rate: > + * > + * Clock rate, in Hertz, of the LVDS differential clock. > + */ > + unsigned long differential_clk_rate; > + > + /** > + * @lanes: > + * > + * Number of active, consecutive, data lanes, starting from > + * lane 0, used for the transmissions. > + */ > + unsigned int lanes; > + > + /** > + * @is_slave: > + * > + * Boolean, true if the phy is a slave which works together > + * with a master phy to support dual link transmission, > + * otherwise a regular phy or a master phy. > + */ > + bool is_slave; > +}; > + > +#endif /* __PHY_LVDS_H_ */ > diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h > index e435bdb..d450b44 100644 > --- a/include/linux/phy/phy.h > +++ b/include/linux/phy/phy.h > @@ -17,6 +17,7 @@ > #include > > #include > +#include > #include > > struct phy; > @@ -51,10 +52,13 @@ enum phy_mode { > * the MIPI_DPHY phy mode. > * @dp: Configuration set applicable for phys supporting > * the DisplayPort protocol. > + * @lvds: Configuration set applicable for phys supporting > + * the LVDS phy mode. > */ > union phy_configure_opts { > struct phy_configure_opts_mipi_dphy mipi_dphy; > struct phy_configure_opts_dp dp; > + struct phy_configure_opts_lvds lvds; > }; > > /** > -- > 2.7.4 -- ~Vinod