lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140513121115.GB3213@kwain>
Date:	Tue, 13 May 2014 14:11:15 +0200
From:	Antoine Ténart 
	<antoine.tenart@...e-electrons.com>
To:	Kishon Vijay Abraham I <kishon@...com>
Cc:	Antoine Ténart 
	<antoine.tenart@...e-electrons.com>,
	sebastian.hesselbarth@...il.com, tj@...nel.org,
	alexandre.belloni@...e-electrons.com,
	thomas.petazzoni@...e-electrons.com, zmxu@...vell.com,
	jszhang@...vell.com, linux-arm-kernel@...ts.infradead.org,
	linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/6] phy: add a driver for the Berlin SATA PHY

Hello,

On Mon, May 12, 2014 at 06:16:46PM +0530, Kishon Vijay Abraham I wrote:
> On Monday 12 May 2014 02:46 PM, Antoine Ténart wrote:

[…]

> > +struct phy_desc {
> 
> to be consistent, lets name it phy_berlin_desc.
> > +	struct phy	*phy;
> > +	u32		val;
> > +	unsigned	index;
> > +};

Sure.

[…]

> > +static int phy_berlin_sata_probe(struct platform_device *pdev)
> > +{
> > +	struct phy *phy;
> > +	struct phy_provider *phy_provider;
> > +	struct priv *priv;
> > +	struct resource *res;
> > +	int i;
> > +
> > +	priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
> > +	if (!priv)
> > +		return -ENOMEM;
> > +
> > +	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > +	priv->base = devm_ioremap(&pdev->dev, res->start, resource_size(res));
> > +	if (IS_ERR(priv->base))
> > +		return PTR_ERR(priv->base);
> > +
> > +	phy = devm_phy_create(&pdev->dev, &phy_berlin_sata_ops, NULL);
> > +	if (IS_ERR(phy))
> > +		return PTR_ERR(phy);
> > +
> > +	dev_set_drvdata(&pdev->dev, priv);
> > +	spin_lock_init(&priv->lock);
> > +
> > +	for (i = 0; i < BERLIN_SATA_PHY_NB; i++) {
> 
> huh.. this should come from dt data. For devices which have multiple PHYs, each
> PHY should be modelled as the sub-node of the *PHY provider* device node.

I'll update, with the bindings suggested by Sebastian.

Thanks for the review!

Antoine

-- 
Antoine Ténart, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ