Lines Matching +full:manufacturer +full:- +full:id
1 // SPDX-License-Identifier: GPL-2.0-or-later
77 int *idxp = file->private_data; in q54sj108a2_debugfs_read()
86 rc = i2c_smbus_read_byte_data(psu->client, PMBUS_OPERATION); in q54sj108a2_debugfs_read()
93 rc = i2c_smbus_read_byte_data(psu->client, PMBUS_WRITE_PROTECT); in q54sj108a2_debugfs_read()
100 rc = i2c_smbus_read_byte_data(psu->client, PMBUS_VOUT_OV_FAULT_RESPONSE); in q54sj108a2_debugfs_read()
107 rc = i2c_smbus_read_byte_data(psu->client, PMBUS_IOUT_OC_FAULT_RESPONSE); in q54sj108a2_debugfs_read()
114 rc = i2c_smbus_read_byte_data(psu->client, PMBUS_REVISION); in q54sj108a2_debugfs_read()
121 rc = i2c_smbus_read_block_data(psu->client, PMBUS_MFR_ID, data); in q54sj108a2_debugfs_read()
126 rc = i2c_smbus_read_block_data(psu->client, PMBUS_MFR_MODEL, data); in q54sj108a2_debugfs_read()
131 rc = i2c_smbus_read_block_data(psu->client, PMBUS_MFR_REVISION, data); in q54sj108a2_debugfs_read()
136 rc = i2c_smbus_read_block_data(psu->client, PMBUS_MFR_LOCATION, data); in q54sj108a2_debugfs_read()
141 rc = i2c_smbus_read_byte_data(psu->client, READ_HISTORY_EVENT_NUMBER); in q54sj108a2_debugfs_read()
148 rc = i2c_smbus_read_block_data(psu->client, READ_HISTORY_EVENTS, data); in q54sj108a2_debugfs_read()
153 rc = res - data; in q54sj108a2_debugfs_read()
157 rc = i2c_smbus_read_block_data(psu->client, PMBUS_FLASH_KEY_WRITE, data); in q54sj108a2_debugfs_read()
162 rc = res - data; in q54sj108a2_debugfs_read()
166 return -EINVAL; in q54sj108a2_debugfs_read()
181 int *idxp = file->private_data; in q54sj108a2_debugfs_write()
185 rc = i2c_smbus_write_byte_data(psu->client, PMBUS_WRITE_PROTECT, 0); in q54sj108a2_debugfs_write()
195 rc = i2c_smbus_write_byte_data(psu->client, PMBUS_OPERATION, dst_data); in q54sj108a2_debugfs_write()
201 rc = i2c_smbus_write_byte(psu->client, PMBUS_CLEAR_FAULTS); in q54sj108a2_debugfs_write()
211 rc = i2c_smbus_write_block_data(psu->client, PMBUS_FLASH_KEY_WRITE, 4, flash_key); in q54sj108a2_debugfs_write()
215 rc = i2c_smbus_write_byte(psu->client, STORE_DEFAULT_ALL); in q54sj108a2_debugfs_write()
225 rc = i2c_smbus_write_byte_data(psu->client, PMBUS_VOUT_OV_FAULT_RESPONSE, dst_data); in q54sj108a2_debugfs_write()
235 rc = i2c_smbus_write_byte_data(psu->client, PMBUS_IOUT_OC_FAULT_RESPONSE, dst_data); in q54sj108a2_debugfs_write()
241 rc = i2c_smbus_write_byte(psu->client, ERASE_BLACKBOX_DATA); in q54sj108a2_debugfs_write()
251 rc = i2c_smbus_write_byte_data(psu->client, SET_HISTORY_EVENT_OFFSET, dst_data); in q54sj108a2_debugfs_write()
257 return -EINVAL; in q54sj108a2_debugfs_write()
279 struct device *dev = &client->dev; in q54sj108a2_probe()
287 if (!i2c_check_functionality(client->adapter, in q54sj108a2_probe()
291 return -ENODEV; in q54sj108a2_probe()
293 if (client->dev.of_node) in q54sj108a2_probe()
296 chip_id = i2c_match_id(q54sj108a2_id, client)->driver_data; in q54sj108a2_probe()
300 dev_err(&client->dev, "Failed to read Manufacturer ID\n"); in q54sj108a2_probe()
305 dev_err(dev, "Unsupported Manufacturer ID '%s'\n", buf); in q54sj108a2_probe()
306 return -ENODEV; in q54sj108a2_probe()
314 dev_err(dev, "Failed to read Manufacturer Model\n"); in q54sj108a2_probe()
319 dev_err(dev, "Unsupported Manufacturer Model '%s'\n", buf); in q54sj108a2_probe()
320 return -ENODEV; in q54sj108a2_probe()
325 dev_err(dev, "Failed to read Manufacturer Revision\n"); in q54sj108a2_probe()
330 dev_err(dev, "Unsupported Manufacturer Revision '%s'\n", buf); in q54sj108a2_probe()
331 return -ENODEV; in q54sj108a2_probe()
338 psu = devm_kzalloc(&client->dev, sizeof(*psu), GFP_KERNEL); in q54sj108a2_probe()
342 psu->client = client; in q54sj108a2_probe()
346 q54sj108a2_dir = debugfs_create_dir(client->name, debugfs); in q54sj108a2_probe()
349 psu->debugfs_entries[i] = i; in q54sj108a2_probe()
352 &psu->debugfs_entries[Q54SJ108A2_DEBUGFS_OPERATION], in q54sj108a2_probe()
355 &psu->debugfs_entries[Q54SJ108A2_DEBUGFS_CLEARFAULT], in q54sj108a2_probe()
358 &psu->debugfs_entries[Q54SJ108A2_DEBUGFS_WRITEPROTECT], in q54sj108a2_probe()
361 &psu->debugfs_entries[Q54SJ108A2_DEBUGFS_STOREDEFAULT], in q54sj108a2_probe()
364 &psu->debugfs_entries[Q54SJ108A2_DEBUGFS_VOOV_RESPONSE], in q54sj108a2_probe()
367 &psu->debugfs_entries[Q54SJ108A2_DEBUGFS_IOOC_RESPONSE], in q54sj108a2_probe()
370 &psu->debugfs_entries[Q54SJ108A2_DEBUGFS_PMBUS_VERSION], in q54sj108a2_probe()
373 &psu->debugfs_entries[Q54SJ108A2_DEBUGFS_MFR_ID], in q54sj108a2_probe()
376 &psu->debugfs_entries[Q54SJ108A2_DEBUGFS_MFR_MODEL], in q54sj108a2_probe()
379 &psu->debugfs_entries[Q54SJ108A2_DEBUGFS_MFR_REVISION], in q54sj108a2_probe()
382 &psu->debugfs_entries[Q54SJ108A2_DEBUGFS_MFR_LOCATION], in q54sj108a2_probe()
385 &psu->debugfs_entries[Q54SJ108A2_DEBUGFS_BLACKBOX_ERASE], in q54sj108a2_probe()
388 &psu->debugfs_entries[Q54SJ108A2_DEBUGFS_BLACKBOX_READ_OFFSET], in q54sj108a2_probe()
391 &psu->debugfs_entries[Q54SJ108A2_DEBUGFS_BLACKBOX_SET_OFFSET], in q54sj108a2_probe()
394 &psu->debugfs_entries[Q54SJ108A2_DEBUGFS_BLACKBOX_READ], in q54sj108a2_probe()
397 &psu->debugfs_entries[Q54SJ108A2_DEBUGFS_FLASH_KEY], in q54sj108a2_probe()