Skip to contentSkip to conversation

ACPI / PMIC: Implement exec_mipi_pmic_seq_element for CHT Whiskey Cove PMIC

PATCH In review Andy Shevchenko 2 participants 2 messages Dec 7, 2018 – Dec 9, 2018 ACPI

lore
Share & tools
lore
#0 lore raw

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

Quoted 7 lines

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.

Review

Quoted 8 lines
(quoted diff) +7 -0
+	/* 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.

Quoted 8 lines
(quoted diff) +8 -0
+		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);
+}
Signature · 8 lines
With Best Regards,
Andy Shevchenko


_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

Hi,

Quoted 14 lines · Andy Shevchenko
Quoted 13 lines

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.

(quoted diff) +6 -0
+	/* 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);
+
Quoted 4 lines

Review

Quoted 1 line
(quoted diff) +1 -0
+	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.

Ok, fixed for v3.

Regards,

Hans

Quoted 10 lines

Review

Quoted 9 lines
(quoted diff) +8 -0
+		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);
+}

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx