[PATCH v2 2/3] ACPI / PMIC: Implement exec_mipi_pmic_seq_element for CHT Whiskey Cove PMIC

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

 



> Implement the exec_mipi_pmic_seq_element callback for the CHT Whiskey Cove
> PMIC.

> On some CHT devices this fixes the LCD panel not lighting up when it was
> not initialized by the GOP, because an external monitor was plugged in and
> the GOP initialized only the external monitor.

> +	/* byte 0 aka PMIC Flag is reserved */
> +	i2c_client_address	= get_unaligned_le16(data + 1);
> +	reg_address		= get_unaligned_le32(data + 3);
> +	value			= get_unaligned_le32(data + 7);
> +	mask			= get_unaligned_le32(data + 11);
> +

> +	if (i2c_client_address > 255 || reg_address > 255) {

Hmm... I would rather like to see hexadecimal for addresses and decimal for
something like countable value for data.

> +		pr_warn("%s warning addresses too big client 0x%x reg 0x%x\n",
> +			__func__, i2c_client_address, reg_address);
> +		return;
> +	}
> +
> +	address = (i2c_client_address << 8) | reg_address;
> +	regmap_update_bits(regmap, address, mask, value);
> +}

-- 
With Best Regards,
Andy Shevchenko


_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux