mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
i2c: amd-isp: Initialize unique adapter name
Initialize unique name for amdisp i2c adapter, which is used in the platform driver to detect the matching adapter for i2c_client creation. Add definition of amdisp i2c adapter name in a new header file (include/linux/soc/amd/isp4_misc.h) as it is referred in different driver modules. Tested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Pratap Nirujogi <pratap.nirujogi@amd.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Link: https://lore.kernel.org/r/20250609155601.1477055-3-pratap.nirujogi@amd.com
This commit is contained in:
parent
942e1aece1
commit
c8dc579169
3 changed files with 15 additions and 0 deletions
|
@ -24063,6 +24063,7 @@ M: Bin Du <bin.du@amd.com>
|
|||
L: linux-i2c@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/i2c/busses/i2c-designware-amdisp.c
|
||||
F: include/linux/soc/amd/isp4_misc.h
|
||||
|
||||
SYNOPSYS DESIGNWARE MMC/SD/SDIO DRIVER
|
||||
M: Jaehoon Chung <jh80.chung@samsung.com>
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/soc/amd/isp4_misc.h>
|
||||
|
||||
#include "i2c-designware-core.h"
|
||||
|
||||
|
@ -62,6 +63,7 @@ static int amd_isp_dw_i2c_plat_probe(struct platform_device *pdev)
|
|||
|
||||
adap = &isp_i2c_dev->adapter;
|
||||
adap->owner = THIS_MODULE;
|
||||
scnprintf(adap->name, sizeof(adap->name), AMDISP_I2C_ADAP_NAME);
|
||||
ACPI_COMPANION_SET(&adap->dev, ACPI_COMPANION(&pdev->dev));
|
||||
adap->dev.of_node = pdev->dev.of_node;
|
||||
/* use dynamically allocated adapter id */
|
||||
|
|
12
include/linux/soc/amd/isp4_misc.h
Normal file
12
include/linux/soc/amd/isp4_misc.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
// SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
/*
|
||||
* Copyright (C) 2025 Advanced Micro Devices, Inc.
|
||||
*/
|
||||
|
||||
#ifndef __SOC_ISP4_MISC_H
|
||||
#define __SOC_ISP4_MISC_H
|
||||
|
||||
#define AMDISP_I2C_ADAP_NAME "AMDISP DesignWare I2C adapter"
|
||||
|
||||
#endif
|
Loading…
Add table
Reference in a new issue