[PATCH linux dev-4.7] drivers: fsi: scom: Add reset functionality and sysfs interface

Jeremy Kerr jk at ozlabs.org
Mon Feb 20 17:54:04 AEDT 2017


Hi Eddie,

The changelog doesn't have much context, so a bit of a question:

> +static ssize_t store_reset_register(struct device *dev,
> +				    struct device_attribute *attr,
> +				    const char *buf, size_t count)
> +{
> +	int rc;
> +	struct fsi_device *fsi_dev = to_fsi_dev(dev);
> +
> +	rc = scom_full_reset(fsi_dev);
> +
> +	return rc ? rc : count;
> +}
> +DEVICE_ATTR(reset, 0200, NULL, store_reset_register);
> +

How does this interact with the scom read/write operations? Having
different interfaces access methods (file for one, sysfs interface for
another)for both seems like an invitation for trouble - would this make
more sense as an ioctl on the existing fd?

Cheers,


Jeremy


More information about the openbmc mailing list