[PATCH linux v5 17/18] drivers/fsi: Add SCOM FSI client device driver

Christopher Bostic christopher.lee.bostic at gmail.com
Fri Oct 21 07:11:20 AEDT 2016


>
>> +static int scom_probe(struct device *dev)
>> +{
>> +     struct fsi_device *fsi_dev = to_fsi_dev(dev);
>> +     struct scom_device *scom = &scom_dev;
>> +     int rc;
>> +
>> +     scom->fsi_dev = fsi_dev;
>> +     scom->cdev = cdev_alloc();
>> +     if (!scom->cdev)
>> +             return -ENOMEM;
>> +
>> +     scom->cdev->owner = THIS_MODULE;
>> +
>> +     rc = register_chrdev(0, "scom", &scom_fops);
>> +     if (rc < 0) {
>> +             dev_dbg(dev, "scom major allocation failed:%d\n", rc);
>> +             return rc;
>> +     }
>> +     dev_dbg(dev, "scom major allocated:%d\n", rc);
>
> You need to register the actual device too, right? We'll want scom0,
> scom1, etc.

Hi Jeremy,

Is there any value in appending an FSI device path to scom?  Like cat'ing the
fsi device name on end.  That's what is done in existing product and it makes
it easy to tell what device is where in the topology.

Thanks,
Chris

>
> Cheers,
>
>
> Jeremy


More information about the openbmc mailing list