/* ex: 0xab 0xcd - write oxcd into register 0xab  */
static ssize_t fsp_attr_set_setreg(struct psmouse *psmouse, void *data, const char *buf, size_t count)
/* ex: 0xab 0xcd - write oxcd into register 0xab  */
static ssize_t fsp_attr_set_setreg(struct psmouse *psmouse, void *data, const char *buf, size_t count)
{
	unsigned long reg, val;
	char *rest;
	ssize_t retval;
	reg = simple_strtoul(buf, &rest, 16);
	if (rest == buf || *rest != ' ' || reg > 0xff)
		return -EINVAL;
	if (strict_strtoul(rest + 1, 16, &val) || val > 0xff)
		return -EINVAL;
	if (fsp_reg_write_enable(psmouse, true))
		return -EIO;
	retval = fsp_reg_write(psmouse, reg, val) < 0 ? -EIO : count;
	fsp_reg_write_enable(psmouse, false);
	return count;
}