Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[linux-6.6.y] i2c: smbus: Add support for Zhaoxin SMBUS controller #278

Merged

Conversation

leoliu-oc
Copy link
Contributor

zhaoxin inclusion
category: feature


The Zhaoxin platform implements the SMBUS controller on the hardware, enabling information exchange and collaboration between devices using the SMBus protocol.

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign xzl01 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-ci-robot
Copy link

Hi @leoliu-oc. Thanks for your PR.

I'm waiting for a deepin-community member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

config I2C_ZHAOXIN_SMB
tristate "Zhaoxin SMBus Interface"
depends on PCI || COMPILE_TEST
default m
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

非X86的话也需要 default m么?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

新版中添加了对CPU_SUP_CENTAUR/CPU_SUP_ZHAOXIN的依赖。以保证只有在兆芯平台上,才会编译为module。

zhaoxin inclusion
category: feature

-------------------

The Zhaoxin platform implements the SMBUS controller on the hardware,
enabling information exchange and collaboration between devices using the
SMBus protocol.

Signed-off-by: leoliu-oc <[email protected]>
@leoliu-oc leoliu-oc force-pushed the linux-6.6.y-72-smbus branch from eae9a1b to 01c4e7b Compare July 4, 2024 06:26
@opsiff
Copy link
Member

opsiff commented Jul 4, 2024

/ok-to-test

@opsiff opsiff merged commit b7631c9 into deepin-community:linux-6.6.y Jul 4, 2024
3 of 4 checks passed
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • zxsmb_transaction函数中,zxsmb_status_check函数的返回值没有被正确处理,可能会导致无限循环或错误。
  • zxsmb_wait_interrput_finishzxsmb_wait_polling_finish函数中使用了wait_for_completion_timeout,但没有处理可能的超时情况。
  • zxsmb_trans_start函数中,outb(tmp, base + ZXSMB_CTL);可能会导致无限循环,因为ZXSMB_STARTZXSMB_PEC_EN位被同时设置。
  • zxsmb_probe函数中,devm_request_irq的第二个参数应该是IRQF_SHARED,而不是IRQF_TRIGGERED
  • zxsmb_probezxsmb_remove函数中,devm_kfree应该在i2c_del_adapter之后调用。
  • zxsmb_smbus_xfer函数中,处理I2C_SMBUS_BLOCK_DATA和I2C_SMBUS_I2C_BLOCK_DATA的情况时,应该检查data->block[0]是否大于I2C_SMBUS_BLOCK_MAX,以避免潜在的越界问题。

是否建议立即修改:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants