Re: [PATCH v1 2/3] i2c: designware-pci: Introduce Merrifield support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2016-06-15 at 16:48 +0300, Jarkko Nikula wrote:
> On 06/15/2016 01:55 AM, Andy Shevchenko wrote:
> > This patch enables I2C controllers found on Intel Edison board.

> > +static int mrfld_setup(struct pci_dev *pdev, struct
> > dw_pci_controller *c)
> > +{
> > +	switch (PCI_SLOT(pdev->devfn)) {
> > +	case 8:
> > +		c->bus_num = PCI_FUNC(pdev->devfn) + 0 + 1;
> > +		return 0;
> > +	case 9:
> > +		c->bus_num = PCI_FUNC(pdev->devfn) + 4 + 1;
> > +		return 0;
> > +	}
> > +	return -ENODEV;
> > +}
> > +
> 
> What kind of bus numbers we are expected to see here and what offsets 
> these magic numbers represent?

Official bus numbers are [1..7]. Thus, this + 1 at the end. First PCI
device provides 4 functions, that's why +0 and +4.
Do I need to add a comment there?

-- 

Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux